roman-numerals 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
@@ -27,6 +27,7 @@ module RomanNumerals
27
27
  end
28
28
 
29
29
  def self.to_decimal(value)
30
+ value.upcase!
30
31
  result = 0
31
32
  @base_digits.values.reverse.each do |roman|
32
33
  while value.start_with? roman
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{roman-numerals}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Vos"]
@@ -38,5 +38,9 @@ describe RomanNumerals do
38
38
  RomanNumerals.to_decimal('MMMMMMMMMMMMMMMMMMMMMMMCCXXXIV').should == 23234
39
39
  RomanNumerals.to_decimal('XLII').should == 42
40
40
  end
41
+ it "handles lower-case roman numerals" do
42
+ RomanNumerals.to_decimal('mmmmmmmmmmmmmmmmmmmmmmmccxxxiv').should == 23234
43
+ RomanNumerals.to_decimal('xlii').should == 42
44
+ end
41
45
  end
42
46
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
7
+ - 3
8
8
  - 0
9
- version: 0.2.0
9
+ version: 0.3.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrew Vos
@@ -95,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
- hash: 1902569055216306147
98
+ hash: 4232208392221155159
99
99
  segments:
100
100
  - 0
101
101
  version: "0"