changeset 13555:f70c894ae874

Ruby: fix minor issues.
author Chris Seaton <chris.seaton@oracle.com>
date Wed, 08 Jan 2014 17:10:18 +0000
parents ba72961e0d41
children 44288fe54352
files graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/call/CallNode.java graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/HashNodes.java graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/StringNodes.java
diffstat 3 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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]);
--- 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);
         }