Skip to content
Commits on Jan 26, 2012
  1. @headius

    Fix JRUBY-6383

    headius committed Jan 26, 2012
    Scala integration breaks with 1.6.6
    
    This has actually been "broken" since 1.6.0, since we were not
    defining the symbolic names for any of the $ Scala methods. This
    fix adds the symbolic names and leaves the originals intact.
  2. @headius

    Fix JRUBY-6384

    headius committed Jan 26, 2012
    Seems like either a bad merge or I deleted a line without noticing it.
  3. @BanzaiMan
  4. @BanzaiMan
  5. @headius

    Update to RubyGems 1.8.15.

    headius committed Jan 25, 2012
Commits on Jan 25, 2012
  1. @headius
  2. @headius

    Merge in threadsafe autoloading for JRuby 1.6.6.

    headius committed Jan 25, 2012
    This has bitten enough people that we're going to try it out on
    the jruby-1_6 branch and see how it goes. We really need folks to
    test their heavily concurrent + autoloaded applications against
    jruby-1_6/1.6.6.dev snapshots from http://ci.jruby.org/snapshots
    to make sure this all works ok.
    
    The following commits are from nahi/jruby, and probably won't
    correlate to commits in JRuby's repository. The command messages
    should match the same commits against master.
    
    Squashed commit of the following:
    
    commit 07133758ba2e1be52069f0b12e9e15e2aa49c528
    Author: Hiroshi Nakamura <nahi@ruby-lang.org>
    Date:   Thu Jan 19 16:39:03 2012 +0900
    
        JRUBY-3194: Avoid NameError for concurrent autoload access
    
        Revert the synchronize change at d7ff5b9.  I wrote 'removing
        unnecessary synchronized block' but I was wrong.
    
        IAutoloadMethod#load which is defined in RubyKernel.java removes
        Autoload object from RubyModule#autoloadMap after successful
        autoloading, and it must be done in synchronized block.  If not, other
        Threads could see orphan autoloadMap just between successful loading and
        autoloadMap clean-up by the initial Thread.  This causes NameError for
        constant access.
    
        PoC project is at [1].  Many thanks to David Kellum who prepared this
        for us!
    
        [1] https://github.com/dekellum/sinatra-threaded-autoload
    
    commit 4531cede5f06eb145ee916e64bbeab6c8f77c152
    Author: Nick Sieger <nick@nicksieger.com>
    Date:   Thu Aug 11 16:31:30 2011 -0500
    
        JRUBY-5987: Fix autoload resolution via IncludedModuleWrapper
    
    commit 93c9bd859e72dc179ccd518b46bec7ef81c99f07
    Author: Hiroshi Nakamura <nahi@ruby-lang.org>
    Date:   Sat Aug 6 00:32:28 2011 +0900
    
        2 autoload bug fixes
    
         * avoid NPE when autoload did not define the constant
         * allow to override autoload with constant definition
    
        Now it passes CRuby's bootstraptest/test_autoload.rb
    
    commit 17b8177d84d7e168ae8f4183fc763488f0194f05
    Author: Hiroshi Nakamura <nahi@ruby-lang.org>
    Date:   Mon Aug 1 19:00:20 2011 +0900
    
        Clean up autoload code.
    
        Something like refactoring, but it includes some modification such as
        removing unnecessary synchronized block.
    
        Added comments for Autoload class and related methods.
    
        In general, autoloadMap must be accessed after checking ConstantMap.
        Checking UNDEF value in constantMap works as a guard. For looking up
        constant, check constantMap first then try to get an Autoload object
        from autoloadMap.  For setting constant, update constantMap first and
        remove an Autoload object from autoloadMap.
    
        For more details about how we're treating Autoload objects, please see
        comments in this commit.
    
        Conflicts:
    
        	src/org/jruby/RubyKernel.java
    
    commit f1b19f0893a0275e09146f6e4fbc22eabe1ab0c8
    Author: Hiroshi Nakamura <nahi@ruby-lang.org>
    Date:   Fri Jul 29 13:06:49 2011 +0900
    
        Add specs of threaded autoload.
    
        Conflicts:
    
        	spec/regression/JRUBY-3194_autoload_thread_safety.rb
    
    commit e490ca3d0a8dd0d41d19f6fdf59f1491d0fa34db
    Author: Hiroshi Nakamura <nahi@ruby-lang.org>
    Date:   Fri Jul 22 15:13:35 2011 +0900
    
        Merged autoloadMap at LoadService and autoloadingMap at RubyModule.
    
        Before CRuby 1.8, autoload only supported toplevel constants. From 1.8,
        it started to support module constants. So there's no need to keep
        autoloadMap in global LoadService.
    
        I moved the map to RubyModule and merged it with autoloadingMap I added
        for this branch. It helps me adding proper synchronization around
        autoload resources.
    
        Conflicts:
    
        	src/org/jruby/RubyKernel.java
    
    commit 67038c6b512a45165e187124667c230e7999a462
    Author: Hiroshi Nakamura <nahi@ruby-lang.org>
    Date:   Tue Jul 19 15:07:47 2011 +0900
    
        Avoid race condition.
    
        This sample crashed. Sigh.
    
        $: << '.'
        loaded_features = $LOADED_FEATURES.dup
        1000.times do
          $LOADED_FEATURES.replace(loaded_features)
          autoload :C, 'c'
          t1 = Thread.new { C }
          t2 = Thread.new { C }
          [t1, t2].each(&:join)
          class Object
            remove_const :C
          end
        end
        puts :OK
    
        Avoid race condition between looking up autoloadingMap in RubyModule and
        autoloadMap in LoadService. This fix is too ad-hoc and must be refined
        in the future. Moving autoloadMap to RubyModule?
    
        Conflicts:
    
        	src/org/jruby/runtime/load/LoadService.java
    
    commit e1edbc9617452eb22cb450c0d9842e875b592b99
    Author: Hiroshi Nakamura <nahi@ruby-lang.org>
    Date:   Tue Jul 12 16:20:24 2011 +0900
    
        Clear autoloading entry in remove_const
    
        Removing constant while autoloading should behave like overwriting
        constant while autoloading. Of course, it could cause NameError in
        autoloading thread, but it's expected behavior in Ruby.
    
    commit ba1a46b5859764034c81c82a671e380496da32be
    Author: Hiroshi Nakamura <nahi@ruby-lang.org>
    Date:   Tue Jul 12 11:07:38 2011 +0900
    
        Avoid infinite loop constant lookup
    
        RubyModule#getConstantFromNoConstMissing() did autoload lookup when the
        defined constant was UNDEF, then tried to detect the defined value at
        the next loop. It caused infinite loop since the constantMap holds UNDEF
        while autoloading in new thread-safe autoloading logic.
    
        Now resolveUndefConstant() blocks if other thread is autoloading, and
        returns correct value so making it simply return the given value from
        resolveUndefConstant(). I checked all resolveUndefConstant() occurrences
        in JRuby project and found there's no other loops.
    
        ant test passes!
    
        ant spec fails with 3 specs but it's from the intended behavir change
        that Module#autoload does not remove the constant from constant table if
        the loaded files does not define it now. The behavior is as same as
        CRuby 1.9, and needed for autoload thread-safety. CRuby 1.8 removes the
        constant, and it's hard to be thread-safe as far as it keeps the current
        behavior.
    
        I believe this JRuby/CRuby behavior incompatibility on 1.8 mode is OK to
        introduce since the behavior is hard to imagine before trying it so no
        one would depend on the behavior intentionally.
    
        Conflicts:
    
        	src/org/jruby/RubyModule.java
    
    commit c8279206a18e01395be409314cf81f8fdc6cd5b1
    Author: Hiroshi Nakamura <nahi@ruby-lang.org>
    Date:   Mon Jul 11 13:34:54 2011 +0900
    
        Make autoload thread-safe (in progress)
    
        Added autoloadingMap to RubyModule to keep an autoloading state. It
        consists of a RubyThread which invokes autoloading and an Object
        assigned to the autoload constant while autoloading.
    
        While autoloading, constantMap keeps UNDEF for the constant and
        autoloadingMap keeps the assigned object instead. Constant lookup checks
        if the value in constantMap is UNDEF, and iif it's UNDEF, it checks
        autloadingMap as well.
    
        It's still in development. For now, it passes
        org.jruby.test.ScriptTestSuite but org.jruby.test.JRubyTestSuite causes
        infinite loop. I'll check later.
    
        Conflicts:
    
        	src/org/jruby/RubyKernel.java
        	src/org/jruby/RubyModule.java
  3. @headius
  4. @wpc @headius
  5. @zszugyi @headius
  6. @headius

    Really fix JRUBY-6361

    headius committed Jan 25, 2012
    RbConfig reports wrong OS type on Solaris
  7. @headius

    Update stdlib to 1.9.2p312.

    headius committed Jan 25, 2012
  8. @headius

    Reinstate engine check.

    headius committed Jan 25, 2012
  9. @headius

    Fix JRUBY-5967

    headius committed Jan 25, 2012
    [1.9] Rails fails to start if any library sets YAML::ENGINE.yamler= 'syck'
    
    I modified our yaml.rb to ignore and warn when setting engine to
    anything other than 'psych'.
Commits on Jan 24, 2012
  1. @headius

    Compiler fix for JRUBY-6377 and refactoring.

    headius committed Jan 24, 2012
    I moved the shared logic to RuntimeHelpers and made the invariant
    "needsSplat" a field on both block types calculated on construct.
  2. @enebo @headius
  3. @enebo
  4. @headius

    Fix JRUBY-6375

    headius committed Jan 24, 2012
    Uninformative YAML parser error
    
    * Added better error message to match 1.9.3.
    
    Conflicts:
    
    	src/org/jruby/ext/psych/PsychParser.java
    
    I also incorporated a number of fixes that had only been applied
    to master and which were causing hassles when merging.
  5. @headius

    Fix JRUBY-6367.

    headius committed Jan 23, 2012
    --pre command line switch not working in 1.9 runtime
    
    This is actually broken in both 1.8 and 1.9 modes, but only 1.9's
    optparse exposed it. We were not properly passing blocks through
    procified Method objects. Fixed MethodBlock and RubyMethod.bmcall
    to do that.
  6. @headius
Commits on Jan 23, 2012
  1. @enebo

    Update jcodings to new 1.0.6

    enebo committed Jan 23, 2012
  2. @headius
  3. @headius

    Don't lock inside try for Mutex#synchronize.

    headius committed Jan 23, 2012
    If the locking process blocks and is interrupted, or raises an
    error for some other reason, the unlock will erroneously produce
    errors since the lock is not locked. Found by @davetron5000.
    
    Conflicts:
    
    	src/org/jruby/ext/thread/Mutex.java
  4. @enebo
Commits on Jan 20, 2012
  1. @BanzaiMan @headius

    Correctly fix Scala-like method name $bslash. Includes spec. This sho…

    BanzaiMan committed with headius Jan 9, 2012
    …uld fix JRUBY-6327.
    
    Conflicts:
    
    	src/org/jruby/javasupport/JavaClass.java
  2. @headius
  3. @headius

    Fix multiple places that called 1.8 instead of 1.9 regexp methods.

    headius committed Jan 19, 2012
    Many places in the codebase unconditionally called the 1.8 versions
    of several RubyRegexp methods that have 1.9-specific behavior. This
    led to hangs like JRUBY-5808, and very likely is the source of
    other encoding-related bugs.
    
    I audited only RubyRegexp methods that have 1.9-specific versions
    and fixed all incorrect calls. Tests and specs pass in interpreted
    and compiled modes. A similar audit for other core classes is most
    definitely warranted.
    
    Conflicts:
    
    	src/org/jruby/compiler/ir/instructions/Match2Instr.java
    	src/org/jruby/compiler/ir/instructions/Match3Instr.java
    	src/org/jruby/compiler/ir/instructions/MatchInstr.java
  4. @headius

    Fix JRUBY-6359

    headius committed Jan 19, 2012
    Can't convert nil to String building ActiveSupport RDoc in 1.9 mode
Commits on Jan 19, 2012
  1. @lopex @headius
  2. @enebo

    [19] JRUBY-6240: java.lang.IllegalArgumentException when running simp…

    enebo committed Jan 19, 2012
    …le RDoc conversion
Commits on Jan 18, 2012
  1. @enebo
  2. @enebo
  3. @enebo
Commits on Jan 17, 2012
  1. @headius

    Remaining fix for JRUBY-5633

    headius committed Jan 17, 2012
    String#encode(opts) not properly implemented for --1.9
  2. @enebo

    [19] Several exposed problems with join from mri19 test suite. 1. emp…

    enebo committed Jan 17, 2012
    …ty [].join should always be USASCII. 2. join of nested arrays should inherit first elements encoding. 3. to_ary never hit because of faulty to_s logic. 4. Nested values in a join should get first elements encoding
Something went wrong with that request. Please try again.