Skip to content

Commit

Permalink
Fix ruby 1.8.7, ree. Add another ruby implementations on travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
kslazarev committed Mar 25, 2013
1 parent a033424 commit 7b13e52
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Expand Up @@ -2,8 +2,10 @@ rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- 2.0.0
- ruby-head
- jruby
- rbx
- jruby-18mode
- jruby-19mode
- rbx-18mode
- rbx-19mode
- ree

Expand Up @@ -16,7 +16,7 @@ def fraction_significance
end

def full_fraction
(0..zero_length).inject(figures.clone) { |result| result.unshift '0' }.to_figures
(0..zero_length).inject(figures.clone) { |result, el| result.unshift '0' }.to_figures
end

def figures
Expand Down
Expand Up @@ -16,7 +16,7 @@ def fraction_significance
end

def full_fraction
(0..zero_length).inject(figures.clone) { |result| result.unshift '0' }.to_figures
(0..zero_length).inject(figures.clone) { |result, el| result.unshift '0' }.to_figures
end

def figures
Expand Down
Expand Up @@ -17,7 +17,7 @@ def fraction_significance
end

def full_fraction
(0..zero_length).inject(figures.clone) { |result| result.unshift '0' }.to_figures
(0..zero_length).inject(figures.clone) { |result, el| result.unshift '0' }.to_figures
end

def figures
Expand Down
Expand Up @@ -17,7 +17,7 @@ def fraction_significance
end

def full_fraction
(0..zero_length).inject(figures.clone) { |result| result.unshift '0' }.to_figures
(0..zero_length).inject(figures.clone) { |result, el| result.unshift '0' }.to_figures
end

def figures
Expand Down
Expand Up @@ -5,19 +5,22 @@ module Languages
module Families
module Helpers
[:zero].each do |method_name|
define_method(method_name) { |options = {}|
define_method(method_name) { |*args|
options = args.first || {}
translate method_name, options
}
end

[:ones, :teens, :tens, :tens_with_ones, :hundreds].each do |method_name|
define_method(method_name) { |options = {}|
define_method(method_name) { |*args|
options = args.first || {}
translate method_name, @figures.send(method_name), options
}
end

[:megs].each do |method_name|
define_method(method_name) { |options = {}|
define_method(method_name) { |*args|
options = args.first || {}
translate method_name, @current_capacity, options
}
end
Expand Down

0 comments on commit 7b13e52

Please sign in to comment.