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

Commits on Jun 22, 2015

  1. Copy the full SHA
    77e783b View commit details
  2. Copy the full SHA
    b48335a View commit details
  3. Copy the full SHA
    89ba433 View commit details
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/env/element_set_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/env/reject_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/env/store_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -33,9 +33,10 @@ public static abstract class ExceptionErrnoErrorPrimitiveNode extends RubiniusPr
protected final static int EACCES = Errno.EACCES.intValue();
protected final static int EFAULT = Errno.EFAULT.intValue();
protected final static int ENOTDIR = Errno.ENOTDIR.intValue();
protected final static int EINVAL = Errno.EINVAL.intValue();

public static boolean isExceptionSupported(int errno) {
return errno == EPERM || errno == ENOENT || errno == EBADF || errno == EEXIST || errno == EACCES || errno == EFAULT || errno == ENOTDIR;
return errno == EPERM || errno == ENOENT || errno == EBADF || errno == EEXIST || errno == EACCES || errno == EFAULT || errno == ENOTDIR || errno == EINVAL;
}

public ExceptionErrnoErrorPrimitiveNode(RubyContext context, SourceSection sourceSection) {
@@ -102,6 +103,11 @@ public RubyException enotdir(RubyString message, int errno) {
return getContext().getCoreLibrary().notDirectoryError(message.toString(), this);
}

@Specialization(guards = "errno == EINVAL")
public RubyException einval(RubyString message, int errno) {
return getContext().getCoreLibrary().errnoError(errno, this);
}

@TruffleBoundary
@Specialization(guards = "!isExceptionSupported(errno)")
public RubyException unsupported(Object message, int errno) {
2 changes: 1 addition & 1 deletion truffle/src/main/ruby/core/hash.rb
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ def merge_fallback(other, &block)
# Rubinius' Hash#reject taints but we don't want this

def reject(&block)
return to_enum(:reject) unless block_given?
return to_enum(:reject) { size } unless block_given?
copy = dup
copy.untaint
copy.delete_if(&block)