Skip to content

Commit

Permalink
Emit next with arguments correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj committed Jul 29, 2013
1 parent 5e3205c commit 23f3ae0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/unparser/emitter/next.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class Next < self
#
def dispatch
write(K_NEXT)
return if children.empty?
parentheses { visit(children.first) }
end

end # Next
Expand Down
1 change: 1 addition & 0 deletions spec/integration/unparser/spike_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def self.assert_source(input, versions = RUBIES)

context 'next' do
assert_source 'next'
assert_source 'next(bar)'
end

context 'retry' do
Expand Down

0 comments on commit 23f3ae0

Please sign in to comment.