Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
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
@@ -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
@@ -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

0 comments on commit 23b3be5

Please sign in to comment.