Skip to content
Browse files

SafeBuffer#gsub spelling and doc tweaks

  • Loading branch information...
1 parent 1fa1134 commit 21054bd4665b8023b3eff261a9fbff90318c3e05 @tardate committed
View
2 activesupport/lib/active_support/core_ext/string/output_safety.rb
@@ -128,7 +128,7 @@ def #{unsafe_method}!(*args)
# In this case $1 == 'm' within the block, but not afterwards
#
# If you really need the magic matching variables after the gsub call
- # you will need to covert SafeBuffer to a String first
+ # you will need to convert SafeBuffer to a String first
def gsub(*args)
to_str.gsub(*args)
end
View
4 activesupport/test/safe_buffer_test.rb
@@ -63,8 +63,8 @@ def setup
@buffer.gsub(/(vesta)/, '')
assert !$1, %(
if you can make this test fail it is a _good_ thing: somehow you have
- restored the standard behaviour of SafeBuffer#gsub to make magic matching variables
- available after the call, and you can probably deprecate this test
+ restored the standard behaviour of SafeBuffer#gsub to make magic matching
+ variables available after the call, and you could invert this test
)
end

0 comments on commit 21054bd

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