Closed gjtorikian closed 10 years ago
Good call, thanks!
Any chance for a new gem release for this? :heart:
Yeah, I think it's about time for SafeYAML 1.0. The API hasn't changed in a while and real-world use is going strong. I'll try to get it out later today.
:christmas_tree:
Clearly by "later today" I meant "in two days" :)
:heart: nonetheless.
This fixes a bug with the
ToInteger#transform?
implementation.Suppose you have a key:value pair of
wordpress_id: 850_
.Integer(value.gsub(",", ""))
causes anArgumentError
, because the_
is not stripped away.Right now we're checking if the first matcher--the decimal value--has an
_
and getting rid of it. We can't just parse the_
away, because binary values (/\A0b[01_]+\Z
) still need it.