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

Commits on Aug 5, 2016

  1. Copy the full SHA
    1890c06 View commit details
  2. Copy the full SHA
    a44b822 View commit details
Showing with 7 additions and 10 deletions.
  1. +5 −1 truffle/src/main/java/org/jruby/truffle/language/arguments/CheckArityNode.java
  2. +2 −9 truffle/src/main/ruby/core/file.rb
Original file line number Diff line number Diff line change
@@ -31,7 +31,11 @@ public void executeVoid(VirtualFrame frame) {

if (!checkArity(arity, given)) {
checkFailedProfile.enter();
throw new RaiseException(coreExceptions().argumentError(given, arity.getRequired(), this));
if (arity.getOptional() > 0) {
throw new RaiseException(coreExceptions().argumentError(given, arity.getRequired(), arity.getOptional(), this));
} else {
throw new RaiseException(coreExceptions().argumentError(given, arity.getRequired(), this));
}
}
}

11 changes: 2 additions & 9 deletions truffle/src/main/ruby/core/file.rb
Original file line number Diff line number Diff line change
@@ -345,15 +345,8 @@ def self.lchown(owner, group, *paths)
paths.size
end

def self.mkfifo(*args)
arg_count = args.size
Rubinius::Type.check_arity(arg_count, 1, 2)
path = args[0]
mode = if arg_count > 1
Rubinius::Type.coerce_to args[1], Integer, :to_int
else
0666
end
def self.mkfifo(path, mode = 0666)
mode = Rubinius::Type.coerce_to mode, Integer, :to_int
path = Rubinius::Type.coerce_to_path(path)
status = Truffle::POSIX.mkfifo(path, mode)
Errno.handle path if status != 0