keisan 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d539ead6f33b2151b228dfe6c30a0e3f7d40bb7b1113c90b851d020e04106df5
4
- data.tar.gz: c36af3538e6f448c285b9857aa5ea14e3bc90853e5d3f4a74fd726d8b0c35068
3
+ metadata.gz: '0817ad5c7f153f93b34fd0c3861a1b4d9afcb49ad325310f2258f6ea020e444d'
4
+ data.tar.gz: 2d1601371bf02fdacdcbd6f29cf72ce9ec15d46a402579dc89418825fde97a5c
5
5
  SHA512:
6
- metadata.gz: 67557029c43754d862406fc0491594b94dcc4dac5a925e518232accfd75c42582f8e5d11b5f99eec7f44dcb1ea29ea31f087668bf70a68c56fa25fc4ca8f2929
7
- data.tar.gz: 2451bd2dbe844af1bc3a4f2ec9d0819aeb4df52f96bd45dbbc5ada1993b2c6003245c8f6191ce3f5dc59de18b106f313e07dedd3aef9ba670525d4bacabfb43a
6
+ metadata.gz: 4faa11222178814693fb58d9db1ddafa7097e49a15e5c59aa8132c26a56e8fc8f69487057ad11e2a37d6dd84d1bb7afa9af4b536ed898d9cd082f357e226098d
7
+ data.tar.gz: ba57a649fbaf1fec6dc29495f86921141c627ea1e652cccd884f30edf4f9e70096803f1ed36acab4b010930abb75dc01cb09cdd5f399c2bec0b03c6c27d1d449
@@ -5,6 +5,11 @@ module Keisan
5
5
 
6
6
  def initialize(number)
7
7
  @number = number
8
+ # Reduce the number if possible
9
+ case @number
10
+ when Rational
11
+ @number = @number.numerator if @number.denominator == 1
12
+ end
8
13
  end
9
14
 
10
15
  def value(context = nil)
@@ -1,3 +1,3 @@
1
1
  module Keisan
2
- VERSION = "0.8.8"
2
+ VERSION = "0.8.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keisan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Locke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-30 00:00:00.000000000 Z
11
+ date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cmath