Only wrap followed_by nodes in begin/end

This commit is contained in:
Yorick Peterse committed 2015-08-19 20:14:24 +02:00
1 parent a661bf8c12
commit f41f6ff0c8
3 files changed
+19 -7

No files matched your search

+5 -1
View File
@@ -63,7 +63,11 @@ module Oga
# @return [Oga::Ruby::Node]
#
def assign(other)
Node.new(:assign, [self, other.wrap])
if other.type == :followed_by
other = other.wrap
end
Node.new(:assign, [self, other])
end
##