NameError in Hash external iterator ----------------------------------- Key: JRUBY-5291 URL: http://jira.codehaus.org/browse/JRUBY-5291 Project: JRuby Issue Type: Bug Components: Core Classes/Modules Affects Versions: JRuby 1.6 Environment: Debian GNU/Linux 6.0 (squeeze), OpenJDK 6, Intel Core i5 Reporter: Nicholas Jefferson Priority: Minor
{0 => 1}.each.next # undefined local variable or method `k' for Hash:Class (NameError) {noformat} diff --git a/src/builtin/generator_internal.rb b/src/builtin/generator_internal.rb index 1aa7c24..4be5c38 100644 --- a/src/builtin/generator_internal.rb +++ b/src/builtin/generator_internal.rb @@ -293,8 +293,8 @@ class Generator class ::Hash include Iterators # these are inefficient and need a place to store 'keys' - indexed_iter(:each) {|h,i| keys = k.keys; [ keys[i], h[keys[i]] ]} - indexed_iter(:each_with_index) {|h,i| keys = k.keys; [ [ keys[i], h[keys[i]] ], i]} + indexed_iter(:each) {|h,i| keys = h.keys; [ keys[i], h[keys[i]] ]} + indexed_iter(:each_with_index) {|h,i| keys = h.keys; [ [ keys[i], h[keys[i]] ], i]} end class Enumerator {noformat} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email