diff options
author | Xavier Noria <fxn@hashref.com> | 2011-06-22 06:30:56 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-06-22 06:30:56 -0700 |
commit | 5654f6870af3cfb7dd92a017e7f86ba40ebfd9bf (patch) | |
tree | cd292c5754c6e67969612d691471b69a7bda6e4a /activesupport/test | |
parent | 53444b861c6e12ce77d6dfa2cd3031979c2d83fa (diff) | |
parent | 9fadf385d892931190b465b691ecef796f0eea5c (diff) | |
download | rails-5654f6870af3cfb7dd92a017e7f86ba40ebfd9bf.tar.gz rails-5654f6870af3cfb7dd92a017e7f86ba40ebfd9bf.tar.bz2 rails-5654f6870af3cfb7dd92a017e7f86ba40ebfd9bf.zip |
Merge pull request #1750 from dmathieu/non_string_methods
Calling unsafe methods which don't return a string shouldn't fail
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/safe_buffer_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/safe_buffer_test.rb b/activesupport/test/safe_buffer_test.rb index a8b39d2c38..08cc00ac51 100644 --- a/activesupport/test/safe_buffer_test.rb +++ b/activesupport/test/safe_buffer_test.rb @@ -104,4 +104,8 @@ class SafeBufferTest < ActiveSupport::TestCase @buffer.safe_concat "BUSTED" end end + + test "should not fail if the returned object is not a string" do + assert_kind_of Enumerator, @buffer.gsub(/.*/) + end end |