Different jruby behaviour that ruby 1.8.6/1.8.7/1.9 when running file that is named as one of required file. ------------------------------------------------------------------------------------------------------------
Key: JRUBY-3128 URL: http://jira.codehaus.org/browse/JRUBY-3128 Project: JRuby Issue Type: Bug Components: Interpreter Affects Versions: JRuby 1.1.5 Environment: ubuntu 8.10 64bit, java version "1.6.0_04" 32bit, jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2008-11-06 rev 6586) [i386-java] Reporter: Radoslaw Bulat Attachments: thread.rb I was doing some simple tests and named my file "thread.rb". In this file I required "thread" library and surprisingly it worked in ruby 1.8.6, 1.8.7, 1.9 but not in JRuby 1.1.5. I know that I shouldn't name my file as one of ruby std library name but I think that it should work the same way for all ruby interpreters. {code:title=thread.rb} require "thread" puts Mutex {code} $ ruby1.8.6 -v ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux] $ ruby1.8.6 thread.rb Mutex $ ruby1.8 -v ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] $ ruby1.8 thread.rb Mutex $ ruby1.9 -v ruby 1.9.0 (2008-11-07 revision 20129) [x86_64-linux] $ ruby1.9 thread.rb Mutex $ jruby -v jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2008-11-06 rev 6586) [i386-java] $ jruby thread.rb null:1:in `const_missing': uninitialized constant Mutex (NameError) from thread.rb:3 from thread.rb:1:in `require' from thread.rb:1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email