JRuby

Add the constant '$~' to the JRuby Runtime

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: JRuby 1.1
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    mac os x 10.5, jruby 1.1, java 5.0 from apple
  • Number of attachments :
    0

Description

autotest needs it at ZenTest-3.9.2/lib/autotest.rb:505: in `call':
result = result.nil? ? [] : Array(result.last.call(filename, $~))

As JRuby hasn't that constant, it is yielding nil to the block, which causes:

$ jruby -S autotest
loading autotest/rspec
/Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/autotest/rspec.rb:11: undefined method `[]' for nil:NilClass (NoMethodError)
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:505:in `call'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:505:in `test_files_for'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:380:in `find_files_to_test'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:380:in `map'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:380:in `find_files_to_test'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:237:in `run_tests'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:226:in `get_to_green'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:206:in `run'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:204:in `loop'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:204:in `run'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/lib/autotest.rb:133:in `run'
from /Users/fck/Development/Ruby/jruby-1.1/lib/ruby/gems/1.8/gems/ZenTest-3.9.2/bin/autotest:55
from /Users/fck/Development/Ruby/jruby-1.1/bin/autotest:19:in `load'
from /Users/fck/Development/Ruby/jruby-1.1/bin/autotest:19

Issue Links

Activity

Hide
Steven Parkes added a comment -

I think this is a dup of JRUBY-2318.

Show
Steven Parkes added a comment - I think this is a dup of JRUBY-2318.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: