lib/ruby2js/converter/while.rb in ruby2js-1.2.0 vs lib/ruby2js/converter/while.rb in ruby2js-1.3.0

- old
+ new

@@ -4,9 +4,14 @@ # (while # (true) # (...)) handle :while do |condition, block| - "while (#{ parse condition }) {#@nl#{ scope block }#@nl}" + begin + next_token, @next_token = @next_token, :continue + "while (#{ parse condition }) {#@nl#{ scope block }#@nl}" + ensure + @next_token = next_token + end end end end