lib/cheeba/reader/format.rb in awesome-cheeba-1.0.3 vs lib/cheeba/reader/format.rb in awesome-cheeba-1.0.4
- old
+ new
@@ -117,10 +117,10 @@
#
# returns int if string is convertable
#
def self.string_to_int(string)
- if string.to_i.to_s == string
+ if string.to_i.to_s == string.gsub(/^0+/, "")
string.to_i
else
string
end
end