Martin Krauskopf wrote:
Hi,

would it be possible to pre-announce releases few days before the real release day, so interested folks could try whether their code works with JRuby. I'm trying to stay up-to-date with trunk, but again, too late.
  (http://jira.codehaus.org/browse/JRUBY-3114)

Pre-announcement would help regressions like the ones related to the debugger (1.1.3 and 1.1.5 breaks the debugger).

Sorry about that...we do need to be better about pre-announcing the release, and I've actually thought it might be workthwhile to always do a short, quick series of RCs before the main release.

Looking at JRUBY-3114, I think you may have been using behavior that was not correct. There were fixes to require because I discovered regardless of whether there are other like-named libraries in the load path, requiring "./foo" always looks for foo in the current directory. Note the following:

◆ ls
foo.rb subdir
◆ ls subdir
foo.rb
◆ cat foo.rb
puts 'foo in cwd'
◆ cat subdir/foo.rb
puts 'foo in subdir'
◆ ruby -I subdir -e "require 'foo'"
foo in subdir
◆ ruby -I subdir -e "require './foo'"
foo in cwd

It also respects Dir.chdir, changing the current directory it searches:

◆ ruby -I subdir -e "require './foo'; $\".shift; Dir.chdir('subdir'); require './foo'"
foo in cwd
foo in subdir

So I believe the behavior that appears to have broken in 1.1.5 is actually now corrected to the right behavior.

If you really want to include the .rb files that are relative to the current file, you'll want to use the File.dirname(__FILE__) trick to build an absolute path.

Please correct me if any of this is wrong :)

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to