Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 3164b0a2c1e6b000d933263716f2e3f2ff1cca52 1 parent 2b9bce8
Nihad Abbasov NARKOZ authored
2  actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -390,7 +390,7 @@ def image_tag(source, options={})
390 390 end
391 391
392 392 if size = options.delete(:size)
393   - options[:width], options[:height] = size.split("x") if size =~ %r{^\d+x\d+$}
  393 + options[:width], options[:height] = size.split("x") if size =~ %r{\A\d+x\d+\z}
394 394 options[:width] = options[:height] = size if size =~ %r{\A\d+\z}
395 395 end
396 396

0 comments on commit 3164b0a

Please sign in to comment.
Something went wrong with that request. Please try again.