Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.4.0RC2
-
Fix Version/s: None
-
Component/s: Intro, Ruby 1.9.2
-
Labels:None
-
Number of attachments :
Description
We have weird prelude.rb content, with require "thread.jar" in there, which causes thread library to be loaded by default in 1.9 mode.
It doesn't make sense. We load Thread library and then redefine some ThreadLibrary's behavior. Why loading of thread library needed at all? MRI 1.9 version of prelude.rb doesn't load 'thread'.
Interestingly there is a subset of Thread,ThreadGroup, and Mutex which are loaded by default with the rest getting loaded by thread.rb. So our thread.rb will load thread.jar and we just need to make sure the appropriate methods are loaded in initCore by default.
For any hackers interested on a JRuby project this is pretty simple. Just add 1.9 method annotated versions for all methods defined in Ruby 1.9s thread.c and then nuke our require 'thread.jar' from prelude.rb.