codegram / futuroscope

Yet another Futures implementation in Ruby
MIT License
210 stars 13 forks source link

Requiring futuroscope without requiring forwardable will return an error #9

Closed pellegrino closed 11 years ago

pellegrino commented 11 years ago

I was trying to follow the examples, and I found that in order to make it work, one have to have forwardable loaded first.

pellegrino@zaratustra ~/tmp $ irb
rubinius-2.0.0.n227 :001 > require 'futuroscope'
NameError: Missing or uninitialized constant: Forwardable
        from kernel/common/module.rb:463:in `const_missing'
        from /Users/pellegrino/.rvm/gems/rbx-head/gems/futuroscope-0.1.3/lib/futuroscope/future.rb:11:in `__script__'
        from /Users/pellegrino/.rvm/gems/rbx-head/gems/futuroscope-0.1.3/lib/futuroscope/future.rb:10:in `__script__'
        from /Users/pellegrino/.rvm/gems/rbx-head/gems/futuroscope-0.1.3/lib/futuroscope/future.rb:4:in `__script__'
        from kernel/common/codeloader.rb:232:in `require'
        from kernel/common/kernel.rb:630:in `gem_original_require (require)'
        from /Users/pellegrino/.rvm/rubies/rbx-head/lib/rubygems/core_ext/kernel_require.rb:51:in `require'
        from /Users/pellegrino/.rvm/gems/rbx-head/gems/futuroscope-0.1.3/lib/futuroscope.rb:3:in `__script__'
        from kernel/common/codeloader.rb:232:in `require'
        from kernel/common/kernel.rb:630:in `gem_original_require (require)'
        from /Users/pellegrino/.rvm/rubies/rbx-head/lib/rubygems/core_ext/kernel_require.rb:116:in `require'
        from (irb):1
        from kernel/common/block_environment.rb:55:in `call_on_instance'
        from kernel/common/eval.rb:74:in `eval'
        from kernel/common/kernel19.rb:42:in `loop'
        from kernel/bootstrap/proc.rb:22:in `call'
        from kernel/common/throw_catch19.rb:8:in `catch'
        from kernel/common/throw_catch.rb:10:in `register'
        from kernel/common/throw_catch19.rb:7:in `catch'
        from kernel/bootstrap/proc.rb:22:in `call'
        from kernel/common/throw_catch19.rb:8:in `catch'
        from kernel/common/throw_catch.rb:10:in `register'
        from kernel/common/throw_catch19.rb:7:in `catch'
        from kernel/delta/codeloader.rb:68:in `load_script'
        from kernel/delta/codeloader.rb:119:in `load_script'
        from kernel/loader.rb:645:in `script'
        from kernel/loader.rb:844:in `main'rubinius-2.0.0.n227 :002 >

I've tested both on Rubinius and JRuby and the behavior was consistent.

Thanks for the great project!

pellegrino commented 11 years ago

Just realised that this in indeed solved at the git repo, but a version with the bug is still being served via rubygems. Would it be possible to update the project with the fixed version?

josepjaume commented 11 years ago

Thank you very much for looking into this - I actually released a new version yesterday but forgot to tell you :)