lib/to_source/visitor.rb in to_source-0.2.8 vs lib/to_source/visitor.rb in to_source-0.2.9
- old
+ new
@@ -1030,12 +1030,10 @@
# @return [undefined]
#
# @api private
#
def regex_literal(node)
- emit '/'
- emit node.source
- emit '/'
+ emit(Regexp.new(node.source).inspect)
end
# Emit receiver
#