maths 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/lib/maths/calc.rb +3 -3
- data/lib/maths/calc.y +3 -3
- data/lib/maths/version.rb +1 -1
- metadata +1 -1
data/.gitignore
CHANGED
data/lib/maths/calc.rb
CHANGED
@@ -48,10 +48,10 @@ module_eval(<<'...end calc.y/module_eval...', 'calc.y', 41)
|
|
48
48
|
@q.push [:VARIABLE, $&]
|
49
49
|
|
50
50
|
# numbers
|
51
|
-
when /\A\d+(
|
51
|
+
when /\A(\d+)?\.(\d+)?([Ee]\d+)?/
|
52
|
+
@q.push [:NUMBER, BigDecimal.new($&)]
|
53
|
+
when /\A\d+([Ee]\d+)?/
|
52
54
|
@q.push [:NUMBER, BigDecimal.new($&)]
|
53
|
-
# when /\A\d+/
|
54
|
-
# @q.push [:NUMBER, BigDecimal.new($&)]
|
55
55
|
when /\A.|\n/o
|
56
56
|
s = $&
|
57
57
|
@q.push [s, s]
|
data/lib/maths/calc.y
CHANGED
@@ -75,10 +75,10 @@ module Maths
|
|
75
75
|
@q.push [:VARIABLE, $&]
|
76
76
|
|
77
77
|
# numbers
|
78
|
-
when /\A\d+(
|
78
|
+
when /\A(\d+)?\.(\d+)?([Ee]\d+)?/
|
79
|
+
@q.push [:NUMBER, BigDecimal.new($&)]
|
80
|
+
when /\A\d+([Ee]\d+)?/
|
79
81
|
@q.push [:NUMBER, BigDecimal.new($&)]
|
80
|
-
# when /\A\d+/
|
81
|
-
# @q.push [:NUMBER, BigDecimal.new($&)]
|
82
82
|
when /\A.|\n/o
|
83
83
|
s = $&
|
84
84
|
@q.push [s, s]
|
data/lib/maths/version.rb
CHANGED