Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

change ^ and $ anchors in regexp to \A and \z respectively

  • Loading branch information...
commit 3164b0a2c1e6b000d933263716f2e3f2ff1cca52 1 parent 2b9bce8
@NARKOZ NARKOZ authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/asset_tag_helper.rb
View
2  actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -390,7 +390,7 @@ def image_tag(source, options={})
end
if size = options.delete(:size)
- options[:width], options[:height] = size.split("x") if size =~ %r{^\d+x\d+$}
+ options[:width], options[:height] = size.split("x") if size =~ %r{\A\d+x\d+\z}
options[:width] = options[:height] = size if size =~ %r{\A\d+\z}
end
Please sign in to comment.
Something went wrong with that request. Please try again.