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:
parent
531eb65557
commit
22d3d5a3b0
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue