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: 66fcdb09cae9
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 15b545e907cf
Choose a head ref
  • 3 commits
  • 11 files changed
  • 1 contributor

Commits on Jun 2, 2015

  1. Copy the full SHA
    ea35e12 View commit details
  2. Copy the full SHA
    811ff98 View commit details
  3. Copy the full SHA
    15b545e View commit details
1 change: 1 addition & 0 deletions spec/truffle/tags/core/argf/close_tags.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
fails:ARGF.close can close STDIN
slow:ARGF.close does not close STDIN
1 change: 1 addition & 0 deletions spec/truffle/tags/core/complex/hash_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Complex#hash is static
2 changes: 2 additions & 0 deletions spec/truffle/tags/core/kernel/method_missing_tags.txt
Original file line number Diff line number Diff line change
@@ -6,3 +6,5 @@ fails:Kernel#method_missing for an instance with #method_missing defined is call
fails:Kernel#method_missing for an instance with #method_missing defined is called when an private method is called
fails:Kernel#method_missing for a Module with #method_missing defined is called when an undefined method is called
fails:Kernel#method_missing for a Class with #method_missing defined is called when an undefined method is called
fails:Kernel#method_missing for a Module with #method_missing defined is called when a protected method is called
fails:Kernel#method_missing for a Module with #method_missing defined is called when a private method is called
6 changes: 6 additions & 0 deletions spec/truffle/tags/core/process/daemon_tags.txt
Original file line number Diff line number Diff line change
@@ -23,3 +23,9 @@ fails:Process.daemon when the second argument is non-false does not redirect std
fails:Process.daemon when the second argument is non-false does not redirect stdin to /dev/null
fails:Process.daemon when the second argument is non-false does not close open files
fails(windows):Process.daemon raises a NotImplementedError when called
fails:Process.daemon when the second argument is not given redirects stdout to /dev/null
fails:Process.daemon when the second argument is not given redirects stderr to /dev/null
fails:Process.daemon when the second argument is false redirects stdout to /dev/null
fails:Process.daemon when the second argument is false redirects stderr to /dev/null
fails:Process.daemon when the second argument is nil redirects stdout to /dev/null
fails:Process.daemon when the second argument is nil redirects stderr to /dev/null
1 change: 1 addition & 0 deletions spec/truffle/tags/core/string/bytes_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:String#bytes yields each byte to a block if one is given, returning self
4 changes: 4 additions & 0 deletions spec/truffle/tags/core/thread/list_tags.txt
Original file line number Diff line number Diff line change
@@ -2,3 +2,7 @@ fails:Thread::list includes the current and main thread
fails:Thread::list includes threads of non-default thread groups
fails:Thread::list does not include deceased threads
fails:Thread::list includes waiting threads
fails:Thread.list includes the current and main thread
fails:Thread.list includes threads of non-default thread groups
fails:Thread.list does not include deceased threads
fails:Thread.list includes waiting threads
6 changes: 6 additions & 0 deletions spec/truffle/tags/core/time/strftime_tags.txt
Original file line number Diff line number Diff line change
@@ -4,3 +4,9 @@ fails:Time#strftime with %N formats the microseconds of of the second with %6N
fails:Time#strftime with %N formats the nanoseconds of of the second with %9N
fails:Time#strftime with %N formats the picoseconds of of the second with %12N
fails:Time#strftime with %z rounds fixed offset to the nearest second
fails:Time#strftime requires an argument
fails:Time#strftime should be able to show the timezone if available
fails:Time#strftime rounds an offset to the nearest second when formatting with %z
fails:Time#strftime with %N formats the nanoseconds of the second with %N
fails:Time#strftime with %N formats the nanoseconds of the second with %9N
fails:Time#strftime with %N formats the picoseconds of the second with %12N
1 change: 1 addition & 0 deletions spec/truffle/tags/library/date/strftime_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Date#strftime supports GNU modificators
1 change: 1 addition & 0 deletions spec/truffle/tags/library/datetime/strftime_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:DateTime#strftime supports GNU modificators
4 changes: 4 additions & 0 deletions spec/truffle/tags/library/zlib/inflate/inflate_tags.txt
Original file line number Diff line number Diff line change
@@ -5,3 +5,7 @@ fails:Zlib::Inflate::inflate properly handles data in chunks
fails:Zlib::Inflate::inflate properly handles incomplete data
fails:Zlib::Inflate::inflate properly handles excessive data, byte-by-byte
fails:Zlib::Inflate::inflate properly handles excessive data, in one go
fails:Zlib::Inflate.inflate properly handles data in chunks
fails:Zlib::Inflate.inflate properly handles incomplete data
fails:Zlib::Inflate.inflate properly handles excessive data, byte-by-byte
fails:Zlib::Inflate.inflate properly handles excessive data, in one go
Original file line number Diff line number Diff line change
@@ -15,11 +15,13 @@
import com.oracle.truffle.api.Truffle;
import com.oracle.truffle.api.dsl.*;
import com.oracle.truffle.api.frame.*;
import com.oracle.truffle.api.frame.FrameInstance.FrameAccess;
import com.oracle.truffle.api.nodes.DirectCallNode;
import com.oracle.truffle.api.nodes.IndirectCallNode;
import com.oracle.truffle.api.source.Source;
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.api.utilities.ConditionProfile;

import org.jcodings.Encoding;
import org.jcodings.specific.USASCIIEncoding;
import org.jcodings.specific.UTF8Encoding;
@@ -224,16 +226,27 @@ public Object compare(VirtualFrame frame, Object self, Object other) {

}

@CoreMethod(names = "abort", isModuleFunction = true)
@CoreMethod(names = "abort", isModuleFunction = true, optional = 1)
public abstract static class AbortNode extends CoreMethodArrayArgumentsNode {

public AbortNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

@TruffleBoundary
@Specialization(guards = "isRubyString(message)")
public RubyBasicObject abort(RubyBasicObject message) {
System.err.println(message.toString());
return abort();
}

@Specialization
public RubyBasicObject abort() {
public RubyBasicObject abort(NotProvided message) {
return abort();
}

@TruffleBoundary
private RubyBasicObject abort() {
getContext().innerShutdown(false);
throw new MainExitException(1, true);
}
@@ -952,6 +965,19 @@ public LambdaNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

@TruffleBoundary
@Specialization
public RubyProc proc(NotProvided block) {
final Frame parentFrame = Truffle.getRuntime().getCallerFrame().getFrame(FrameAccess.READ_ONLY, true);
final RubyProc parentBlock = RubyArguments.getBlock(parentFrame.getArguments());

if (parentBlock == null) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("tried to create Proc object without a block", this));
}
return proc(parentBlock);
}

@Specialization
public RubyProc proc(RubyProc block) {
return new RubyProc(getContext().getCoreLibrary().getProcClass(), RubyProc.Type.LAMBDA,