fractional 1.2.0 → 1.2.1

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
  SHA1:
3
- metadata.gz: bf16c52b37e110020de5ba81093c8c32dbb8c252
4
- data.tar.gz: df91e571f26e25d8b7d182625dbd4b194a3970ce
3
+ metadata.gz: 515eba1b411367859891df3da293d8429b458e44
4
+ data.tar.gz: 8dd7a05144b6d76d8e1a9bdbd872a09401ca5af0
5
5
  SHA512:
6
- metadata.gz: 8475b78b70e2cb066ed13d0471c20d91fd06f55ae7182d7d9fff8825c0b8acaed8eb6d7a3446cdbe88d548d4557e7fbff5ed45b6f622190759ef98d466fbe4cb
7
- data.tar.gz: 9f038a12f72a85ecbd796573c1f2f06a76a5c165df1b5adc5b207945528ba7a6d9d4c4989a052e03a44bc1714d834c98f038a7d0254ece9e744fbaeaa0adc54a
6
+ metadata.gz: 38a327967a97293acecfa8755c70589f407b134e5e1f151b6e030dd75a83da7df50c331c180d90c508fa162136db5a3e235a8aceb071c80f0c2a43bb8fb45f65
7
+ data.tar.gz: bd7c7fd573616306b05ea224bb9583c07c8aa436568e3fa01d0966926549725946a30b905f6e21593265978c1c621e1b254d1f82694268da2bcac787201eefbb
data/fractional.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "fractional"
3
- spec.version = "1.2.0"
3
+ spec.version = "1.2.1"
4
4
  spec.authors = ["Chris O'Sullivan"]
5
5
  spec.email = ["thechrisoshow@gmail.com"]
6
6
  spec.description = %q{Fractional is a Ruby library for parsing fractions.}
data/lib/fractional.rb CHANGED
@@ -13,14 +13,12 @@ class Fractional < Numeric
13
13
  @value = value
14
14
  when String
15
15
  @value = Fractional.string_to_fraction( value, options )
16
- when Fixnum
16
+ when Numeric
17
17
  if @value == @value.to_i
18
18
  @value = Rational(value)
19
19
  else # It's still Rational if it's a natural number
20
20
  @value = Fractional.float_to_fraction( value.to_f, options )
21
21
  end
22
- when Numeric
23
- @value = Fractional.float_to_fraction( value.to_f, options )
24
22
  else
25
23
  raise TypeError, "Cannot instantiate Fractional from #{value.class}"
26
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fractional
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris O'Sullivan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-13 00:00:00.000000000 Z
11
+ date: 2017-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.5.1
108
+ rubygems_version: 2.6.11
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: 'You can use fractional to convert decimal numbers to string representations
@@ -113,4 +113,3 @@ summary: 'You can use fractional to convert decimal numbers to string representa
113
113
  test_files:
114
114
  - spec/fractional_spec.rb
115
115
  - spec/spec_helper.rb
116
- has_rdoc: