Defines String#to_a (Object#to_a removed in ruby1.9).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2912 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-10-10 15:09:19 +00:00
parent 531eb65557
commit 22d3d5a3b0
1 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,13 @@ module Redmine #:nodoc:
s.gsub!(',', '.') s.gsub!(',', '.')
begin; Kernel.Float(s); rescue; nil; end begin; Kernel.Float(s); rescue; nil; end
end end
# Object#to_a removed in ruby1.9
if RUBY_VERSION > '1.9'
def to_a
[self.dup]
end
end
end end
end end
end end