Created
May 18, 2013 13:53
-
-
Save sferik/5604472 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'prime' | |
Prime.each_with_index.inject(0) do |sum, (number, index)| | |
puts index + 1 if sum % number == 0 | |
sum += number | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeError: Array can't be coerced into Fixnum | |
% at org/jruby/RubyFixnum.java:634 | |
(root) at clean_chains.rb:4 | |
call at org/jruby/RubyProc.java:255 | |
each at /Users/sferik/.rbenv/versions/jruby-1.7.4/lib/ruby/1.9/prime.rb:287 | |
loop at org/jruby/RubyKernel.java:1489 | |
each at /Users/sferik/.rbenv/versions/jruby-1.7.4/lib/ruby/1.9/prime.rb:286 | |
each at /Users/sferik/.rbenv/versions/jruby-1.7.4/lib/ruby/1.9/prime.rb:149 | |
__send__ at org/jruby/RubyBasicObject.java:1703 | |
each at /Users/sferik/.rbenv/versions/jruby-1.7.4/lib/ruby/1.9/forwardable.rb:201 | |
each_with_index at org/jruby/RubyEnumerable.java:920 | |
each at org/jruby/RubyEnumerator.java:270 | |
inject at org/jruby/RubyEnumerable.java:815 | |
(root) at clean_chains.rb:3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment