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: ae260755509f
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 61bc7a9b0c67
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 10, 2016

  1. Copy the full SHA
    1cfaf86 View commit details
  2. Copy the full SHA
    61bc7a9 View commit details
Showing with 11 additions and 9 deletions.
  1. +10 −8 core/src/main/java/org/jruby/runtime/Frame.java
  2. +1 −1 lib/ruby/stdlib/rubygems/defaults/jruby.rb
18 changes: 10 additions & 8 deletions core/src/main/java/org/jruby/runtime/Frame.java
Original file line number Diff line number Diff line change
@@ -82,10 +82,10 @@ public final class Frame {
private Visibility visibility = Visibility.PUBLIC;

/** backref **/
private IRubyObject backRef;
private final ThreadLocal<IRubyObject> backRef = new ThreadLocal<>();

/** lastline **/
private IRubyObject lastLine;
private final ThreadLocal<IRubyObject> lastLine = new ThreadLocal<>();

/** whether this frame has been captured into a binding **/
private boolean captured;
@@ -188,8 +188,8 @@ public Frame clear() {
this.self = null;
this.klazz = null;
this.block = Block.NULL_BLOCK;
this.backRef = null;
this.lastLine = null;
this.backRef.remove();
this.lastLine.remove();

return this;
}
@@ -297,21 +297,23 @@ public Block getBlock() {
}

public IRubyObject getBackRef(IRubyObject nil) {
IRubyObject backRef = this.backRef;
IRubyObject backRef = this.backRef.get();
return backRef == null ? nil : backRef;
}

public IRubyObject setBackRef(IRubyObject backRef) {
return this.backRef = backRef;
this.backRef.set(backRef);
return backRef;
}

public IRubyObject getLastLine(IRubyObject nil) {
IRubyObject lastLine = this.lastLine;
IRubyObject lastLine = this.lastLine.get();
return lastLine == null ? nil : lastLine;
}

public IRubyObject setLastLine(IRubyObject lastLine) {
return this.lastLine = lastLine;
this.lastLine.set(lastLine);
return lastLine;
}

public void setCaptured(boolean captured) {
2 changes: 1 addition & 1 deletion lib/ruby/stdlib/rubygems/defaults/jruby.rb
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ def self.win_platform?
# Allow specifying jar and classpath type gem path entries
def self.path_separator
return File::PATH_SEPARATOR unless File::PATH_SEPARATOR == ':'
/(?<!jar:file|jar|file|classpath|uri:classloader|uri):/
/(?<!jar:file|jar|file|classpath|uri:classloader|uri|http|https):/
end
end