lib/vendor/sexpistol/sexpistol/sexpistol_parser.rb in qcmd-0.1.12 vs lib/vendor/sexpistol/sexpistol/sexpistol_parser.rb in qcmd-0.1.13

- old
+ new

@@ -71,13 +71,13 @@ matched # Match a string literal elsif scan(/"([^"\\]|\\.)*"/) eval(matched) # Match a float literal - elsif scan(/[\-\+]? [0-9]+ ((e[0-9]+) | (\.[0-9]+(e[0-9]+)?)) (\s|$)/x) + elsif scan(/[\-\+]? [0-9]+ ((e[0-9]+) | (\.[0-9]+(e[0-9]+)?))(\)| )(\s|$)/x) matched.to_f # Match an integer literal - elsif scan(/[\-\+]?[0-9]+ (\s|$)/x) + elsif scan(/[\-\+]?[0-9]+(\)| )(\s|$)/x) matched.to_i # Match a comma (for comma quoting) elsif scan(/'/) matched.to_sym # Match a symbol