Skip to content

Commit

Permalink
Add a JIT spec for #4148, testing attr reader call with *args.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Sep 19, 2016
1 parent 2aabd98 commit 0ca3184
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/compiler/general_spec.rb
Expand Up @@ -1142,5 +1142,12 @@ def self.foo
it "compiles calls with one float arg that do not have optimized paths" do
run('ary = []; ary.push(1.0)') {|x| expect(x).to eq([1.0]) }
end

# jruby/jruby#4148
it "binds variable-arity calls to attributes properly" do
run('a_class = Class.new do; attr_accessor :foo; end; a = a_class.new; a.foo = 1; ary = []; a.foo(*ary)') do |x|
expect(x).to eq(1)
end
end
end
end

0 comments on commit 0ca3184

Please sign in to comment.