Skip to content

Commit

Permalink
SafeBuffer#gsub spelling and doc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tardate committed Jun 10, 2011
1 parent 1fa1134 commit 21054bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions activesupport/test/safe_buffer_test.rb
Expand Up @@ -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

Expand Down

0 comments on commit 21054bd

Please sign in to comment.