JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6890

Rework paths to be similar to MRI + redefinable + defined in one place only

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.pre2
    • Fix Version/s: JRuby 1.7.0.RC1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1

      Description

      The attached patch handles few different improvements:
      1) The paths in RbConfig are configurable through JAVA_OPTS environment variable - this should be used for integration with various distributions that want to change/add load paths. By default, current behaviour is used.
      2) The paths are extended to match MRI's path set in RbConfig more closely.
      3) Paths in LoadService are taken from RbConfig, therefore they are defined only once.

      I would very much like to work on this patch further, if you don't like its current behaviour.

      Thanks for considering!

      1. jruby-path-rework.patch
        12 kB
        Bohuslav "Slavek" Kabrda

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Your changes looked good to me. I'm especially pleased you didn't impost vendor_lib on the load path unless the value was different from site_lib, saving us the extra lookup.

        commit 781ef4df523177a71fecba2e54aa4951854881e9
        Author: Charles Oliver Nutter <headius@headius.com>
        Date:   Wed Sep 19 01:19:18 2012 -0500
        
            Fix JRUBY-6890
            
            Rework paths to be similar to MRI + redefinable + defined in one place only
            
            Patch by Bohuslav Kabrda.
        
        :100644 100644 2e46d45... ad050a4... M	src/org/jruby/ext/rbconfig/RbConfigLibrary.java
        :100644 100644 5ca0ff0... ef4ec5e... M	src/org/jruby/runtime/load/LoadService.java
        
        Show
        Charles Oliver Nutter added a comment - Your changes looked good to me. I'm especially pleased you didn't impost vendor_lib on the load path unless the value was different from site_lib, saving us the extra lookup. commit 781ef4df523177a71fecba2e54aa4951854881e9 Author: Charles Oliver Nutter <headius@headius.com> Date: Wed Sep 19 01:19:18 2012 -0500 Fix JRUBY-6890 Rework paths to be similar to MRI + redefinable + defined in one place only Patch by Bohuslav Kabrda. :100644 100644 2e46d45... ad050a4... M src/org/jruby/ext/rbconfig/RbConfigLibrary.java :100644 100644 5ca0ff0... ef4ec5e... M src/org/jruby/runtime/load/LoadService.java
        Hide
        Bohuslav "Slavek" Kabrda added a comment -

        Thank you!

        Show
        Bohuslav "Slavek" Kabrda added a comment - Thank you!

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Bohuslav "Slavek" Kabrda
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: