Skip to content

Commit

Permalink
[Truffle] Fix processing of empty when clauses.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Feb 9, 2015
1 parent e1b597c commit c4185ef
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -733,7 +733,7 @@ public RubyNode visitCaseNode(org.jruby.ast.CaseNode node) {

RubyNode thenNode;

if (when.getBodyNode() == null) {
if (when.getBodyNode() == null || when.getBodyNode().isNil()) {
thenNode = new ObjectLiteralNode(context, sourceSection, context.getCoreLibrary().getNilObject());
} else {
thenNode = when.getBodyNode().accept(this);
Expand Down

0 comments on commit c4185ef

Please sign in to comment.