Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5f1babf1f8b3
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3dbb634f2764
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jul 8, 2015

  1. Copy the full SHA
    3af7fe1 View commit details
  2. Copy the full SHA
    3dbb634 View commit details
Showing with 24 additions and 12 deletions.
  1. +1 −1 lib/ruby/stdlib/open3.rb
  2. +0 −1 spec/truffle/tags/core/module/prepend_tags.txt
  3. +23 −10 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyModule.java
2 changes: 1 addition & 1 deletion lib/ruby/stdlib/open3.rb
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@

# Because spawn does not yet work on Windows, we fall back on the older open3 there.
real_open3 = true
if org.jruby.platform.Platform::IS_WINDOWS
if defined?(org) && org.jruby.platform.Platform::IS_WINDOWS
require 'jruby/open3_windows'
real_open3 = false
end
1 change: 0 additions & 1 deletion spec/truffle/tags/core/module/prepend_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -89,6 +89,19 @@ public void insertAfter(RubyModule module) {

}

public static void debugModuleChain(RubyModule module) {
ModuleChain chain = module;
while (chain != null) {
System.err.print(chain.getClass());
if (!(chain instanceof PrependMarker)) {
RubyModule real = chain.getActualModule();
System.err.print(" " + real.getName());
}
System.err.println();
chain = chain.getParentModule();
}
}

/**
* The slot within a module definition method frame where we store the implicit state that is
* the current visibility for new methods.
@@ -178,7 +191,7 @@ public void initCopy(RubyModule from) {
this.classVariables.putAll(from.classVariables);

if (from.start.getParentModule() != from) {
this.parentModule = from.start;
this.parentModule = from.start.getParentModule();
} else {
this.parentModule = from.parentModule;
}
@@ -271,15 +284,15 @@ public void prepend(Node currentNode, RubyModule module) {
throw new RaiseException(getContext().getCoreLibrary().argumentError("cyclic prepend detected", currentNode));
}

Stack<RubyModule> modulesToPrepend = new Stack<>();
modulesToPrepend.push(module);
for (RubyModule includedModule : module.prependedAndIncludedModules()) {
modulesToPrepend.push(includedModule);
}

for (RubyModule mod : modulesToPrepend) {
start.insertAfter(mod);
mod.addDependent(this);
ModuleChain mod = module.start;
ModuleChain cur = start;
while (mod != null && !(mod instanceof RubyClass)) {
if (!(mod instanceof PrependMarker)) {
cur.insertAfter(mod.getActualModule());
mod.getActualModule().addDependent(this);
cur = cur.getParentModule();
}
mod = mod.getParentModule();
}

newVersion();