# HG changeset patch # User Chris Seaton # Date 1389201018 0 # Node ID f70c894ae8748b5cdc3927fb05ff65c3b42f7ba7 # Parent ba72961e0d413ac839207d5ef6fcd76408ec61d2 Ruby: fix minor issues. diff -r ba72961e0d41 -r f70c894ae874 graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/call/CallNode.java --- a/graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/call/CallNode.java Wed Jan 08 15:40:06 2014 +0100 +++ b/graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/call/CallNode.java Wed Jan 08 17:10:18 2014 +0000 @@ -79,7 +79,7 @@ this.name = name; this.isSplatted = isSplatted; - dispatchHead = adoptChild(adoptChild(new DispatchHeadNode(context, section, name, isSplatted))); + dispatchHead = adoptChild(new DispatchHeadNode(context, section, name, isSplatted)); } @Override diff -r ba72961e0d41 -r f70c894ae874 graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/HashNodes.java --- a/graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/HashNodes.java Wed Jan 08 15:40:06 2014 +0100 +++ b/graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/HashNodes.java Wed Jan 08 17:10:18 2014 +0000 @@ -44,7 +44,10 @@ hash.put(keyValue.get(0), keyValue.get(1)); } } else { - assert args.length % 2 == 0; + if (args.length % 2 != 0) { + // TODO(CS): figure out what error to throw here + throw new UnsupportedOperationException(); + } for (int n = 0; n < args.length; n += 2) { hash.put(args[n], args[n + 1]); diff -r ba72961e0d41 -r f70c894ae874 graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/StringNodes.java --- a/graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/StringNodes.java Wed Jan 08 15:40:06 2014 +0100 +++ b/graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/StringNodes.java Wed Jan 08 17:10:18 2014 +0000 @@ -304,13 +304,13 @@ } @CoreMethod(names = "inspect", maxArgs = 0) - public abstract static class InpsectNode extends CoreMethodNode { + public abstract static class InspectNode extends CoreMethodNode { - public InpsectNode(RubyContext context, SourceSection sourceSection) { + public InspectNode(RubyContext context, SourceSection sourceSection) { super(context, sourceSection); } - public InpsectNode(InpsectNode prev) { + public InspectNode(InspectNode prev) { super(prev); }