Skip to content

Commit

Permalink
Fix bad merge of SkinnyMethodAdapter spec.
Browse files Browse the repository at this point in the history
The "let" used on master was getting assigned the result of the
"expect" calls merged in from jruby-1_7.
  • Loading branch information
headius committed Jan 20, 2016
1 parent b35397b commit 23b3be5
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions spec/compiler/skinnymethodadapter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
describe "SkinnyMethodAdapter" do
let(:instance_methods) { SkinnyMethodAdapter.instance_methods.map(&:to_s) }
let(:insn_opcodes) do
insn_opcodes = Opcodes.constants.select do |c|
case c.to_s # for 1.9's symbols
Opcodes.constants.map(&:to_s).select do |c|
case c

when /ACC_/, # access modifiers
/V1_/, # version identifiers
Expand All @@ -36,20 +36,7 @@
else
true
end
end.map(&:to_s).map(&:downcase)
# 1.9 makes them symbols, so to_s the lot
insn_opcodes = insn_opcodes.map(&:to_s)
instance_methods = SkinnyMethodAdapter.instance_methods.map(&:to_s)

insn_opcodes.each do |opcode|
opcode = opcode.downcase
expect(instance_methods).to include(opcode)
end

expect(instance_methods).to include("go_to")
expect(instance_methods).to include("voidreturn")
expect(instance_methods).to include("instance_of")
expect(instance_methods).to include("newobj")
end.map(&:downcase)
end

it "supports all JVM opcodes" do
Expand Down

0 comments on commit 23b3be5

Please sign in to comment.