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

inconsistent each and each_with_index return #4046

Closed
kares opened this issue Aug 1, 2016 · 1 comment
Closed

inconsistent each and each_with_index return #4046

kares opened this issue Aug 1, 2016 · 1 comment
Assignees
Milestone

Comments

@kares
Copy link
Member

kares commented Aug 1, 2016

in Ruby these return self - so they should do the same for Java integration (instead of nil) :

jruby-9.1.2.0 :001 > require 'set'
 => true 
jruby-9.1.2.0 :002 > ret = Set.new([1, 2]).each { |i| i }
 => #<Set: {1, 2}> 
jruby-9.1.2.0 :003 > ret = java.util.ArrayList.new([1]).each { |i| i }
 => nil 
jruby-9.1.2.0 :004 > ret = java.util.HashSet.new([1]).each { |i| i }
 => nil 
jruby-9.1.2.0 :005 > ret = [].each { |i| i }
 => [] 
@kares kares added this to the JRuby 9.1.3.0 milestone Aug 1, 2016
@kares kares self-assigned this Aug 1, 2016
@kares
Copy link
Member Author

kares commented Aug 1, 2016

fixed with 9020527

@kares kares closed this as completed Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant