Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/HashNodes.java @ 13555:f70c894ae874
Ruby: fix minor issues.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Wed, 08 Jan 2014 17:10:18 +0000 |
parents | 0fbee3eb71f0 |
children |
line wrap: on
line diff
--- 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]);