maths 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/maths/calc.rb CHANGED
@@ -279,7 +279,7 @@ module_eval(<<'.,.,', 'calc.y', 20)
279
279
 
280
280
  module_eval(<<'.,.,', 'calc.y', 21)
281
281
  def _reduce_9(val, _values, result)
282
- result = result.power(val[2])
282
+ result = result.power(val[2].to_r)
283
283
  result
284
284
  end
285
285
  .,.,
data/lib/maths/calc.y CHANGED
@@ -19,7 +19,7 @@ rule
19
19
  | exp '*' exp { result *= val[2] }
20
20
  | exp '/' exp { result /= val[2] }
21
21
  | exp '%' exp { result %= val[2] }
22
- | exp '^' exp { result = result.power(val[2])}
22
+ | exp '^' exp { result = result.power(val[2].to_r)}
23
23
  | '(' exp ')' { result = val[1] }
24
24
  | '|' exp '|' { result = val[1].abs }
25
25
  | '-' NUMBER =UMINUS { result = -val[1] }
data/lib/maths/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Maths
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maths
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-25 00:00:00.000000000 Z
12
+ date: 2013-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure