Skip to content

Commit

Permalink
Fix too fexible regex
Browse files Browse the repository at this point in the history
  • Loading branch information
camelmasa committed Feb 23, 2016
1 parent f63fc99 commit 589d938
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -135,7 +135,7 @@ class Tweet < Hash
coerce_key :retweeted, ->(v) do
case v
when String
return !!(v =~ /^(true|t|yes|y|1)$/i)
return !!(v =~ /\A(true|t|yes|y|1)\z/i)
when Numeric
return !v.to_i.zero?
else
Expand Down

0 comments on commit 589d938

Please sign in to comment.