Skip to content

Commit

Permalink
Update the RbenvBundler#ensure_capable_ruby method so that it no long…
Browse files Browse the repository at this point in the history
…er claims JRuby 1.9.x as capable when it's not (lack of Kernel.fork)

This should resolve issue #21.
  • Loading branch information
carsomyr committed Jul 22, 2012
1 parent 235d5a3 commit cb0d4a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ to report Bundler-installed gem executables if available.

**0.94** (July 21, 2012)

* Fix issue [\#21](https://github.com/carsomyr/rbenv-bundler/issues/21), where
the `RbenvBundler#ensure_capable_ruby` method would claim JRuby 1.9.x as
capable when it's not (lack of `Kernel.fork`).
* Fix issue [\#22](https://github.com/carsomyr/rbenv-bundler/issues/22). This
addresses the corner cases when either the `manifest.txt` file doesn't exist
or the `ruby_profiles.yml` file is first created.
Expand Down
3 changes: 2 additions & 1 deletion etc/rbenv.d/bundler/rehash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ def self.build_ruby_profiles(out_dir = Pathname.new("."))
#
# @param [Hash] ruby_profile_map a Hash from rbenv version names to Ruby profiles.
def self.ensure_capable_ruby(ruby_profile_map)
return nil if (SEMANTIC_RUBY_VERSION <=> [1, 9]) >= 0
# Check if the current Ruby is capable.
return nil if (SEMANTIC_RUBY_VERSION <=> [1, 9]) >= 0 && Gem.ruby_engine != "jruby"

# Find all Rubies that are 1.9+ and are not JRuby (no Kernel.fork).
rbenv_versions = ruby_profile_map.select do |rbenv_version, ruby_profile|
Expand Down

0 comments on commit cb0d4a2

Please sign in to comment.