Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
compare: master
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
2  lib/ripper_ruby_parser/sexp_handlers/literals.rb
@@ -23,6 +23,8 @@ def process_string_embexpr exp
val = process(list.first)
if val.sexp_type == :str
val
+ elsif val.sexp_type == :void_stmt
+ s(:evstr)
else
s(:evstr, val)
end
View
13 lib/ripper_ruby_parser/sexp_handlers/loops.rb
@@ -31,9 +31,16 @@ def process_while_mod exp
def process_for exp
_, var, coll, block = exp.shift 4
- s(:for, process(coll),
- s(:lasgn, process(var)[1]),
- handle_statement_list(block))
+ body = handle_statement_list(block)
+
+ if body.nil?
+ s(:for, process(coll),
+ s(:lasgn, process(var)[1]))
+ else
+ s(:for, process(coll),
+ s(:lasgn, process(var)[1]),
+ body)
+ end
end
private

No commit comments for this range

Something went wrong with that request. Please try again.