Skip to content

Commit

Permalink
Fix Enumerable#inject to return nil when the result is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Mar 21, 2014
1 parent d9989fc commit fc199b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opal/corelib/enumerable.rb
Expand Up @@ -664,7 +664,7 @@ def inject(object = undefined, sym = undefined, &block)
self.$each();
return result;
return result == undefined ? nil : result;
}
end

Expand Down

0 comments on commit fc199b5

Please sign in to comment.