Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"each_with_object({}, &lambda_logic)" raise ArgumentError #2943

Closed
yousuketto opened this issue May 15, 2015 · 0 comments
Closed

"each_with_object({}, &lambda_logic)" raise ArgumentError #2943

yousuketto opened this issue May 15, 2015 · 0 comments

Comments

@yousuketto
Copy link
Contributor

ArgumentError did not occur in CRuby2.2.2 and JRuby1.7.19, but is occurred in JRuby9.0.0.0.pre2.

#example.rb
storategy = lambda{|str, hash| hash[str] = str}
p %w(a b c d e f g).each_with_object({}, &storategy)
$ jruby -v
jruby 9.0.0.0.pre2 (2.2.2) 2015-04-28 2755ae0 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]
$ jruby example.rb 
ArgumentError: wrong number of arguments (1 for 2)
              each at org/jruby/RubyArray.java:1571
  each_with_object at org/jruby/RubyEnumerable.java:1014
             <top> at example.rb:2
@enebo enebo added this to the JRuby 9.0.0.0.rc1 milestone May 15, 2015
kares added a commit to kares/jruby that referenced this issue Jun 29, 2015
since `lambda{ |str, hash| }` was no longer working
(as in JRuby 1.7.x) fixes jruby#2943
@kares kares closed this as completed in 53ff459 Jun 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants