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

yousuketto opened this issue May 15, 2015 · 0 comments

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

yousuketto opened this issue May 15, 2015 · 0 comments


Copy link

@yousuketto yousuketto commented May 15, 2015

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

storategy = lambda{|str, hash| hash[str] = str}
p %w(a b c d e f g).each_with_object({}, &storategy)
$ jruby -v
jruby (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/
  each_with_object at org/jruby/
             <top> at example.rb:2
@enebo enebo added this to the JRuby 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 in 53ff459 Jun 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants