aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-03-22 22:25:55 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-03-22 22:25:55 +0300
commit9c857db75788c21f6184279c130e79f21c750f9f (patch)
tree510a99740da381a64db66fe1601b7ebf263c837a /activesupport/test/core_ext
parent64249223ebb2b51814d8764c498b14a12d072b83 (diff)
downloadrails-9c857db75788c21f6184279c130e79f21c750f9f.tar.gz
rails-9c857db75788c21f6184279c130e79f21c750f9f.tar.bz2
rails-9c857db75788c21f6184279c130e79f21c750f9f.zip
deprecate Proc#bind that can cause symbol memory leak
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/proc_test.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/activesupport/test/core_ext/proc_test.rb b/activesupport/test/core_ext/proc_test.rb
index 690bfd3bf8..c4d5592196 100644
--- a/activesupport/test/core_ext/proc_test.rb
+++ b/activesupport/test/core_ext/proc_test.rb
@@ -3,10 +3,12 @@ require 'active_support/core_ext/proc'
class ProcTests < ActiveSupport::TestCase
def test_bind_returns_method_with_changed_self
- block = Proc.new { self }
- assert_equal self, block.call
- bound_block = block.bind("hello")
- assert_not_equal block, bound_block
- assert_equal "hello", bound_block.call
+ assert_deprecated do
+ block = Proc.new { self }
+ assert_equal self, block.call
+ bound_block = block.bind("hello")
+ assert_not_equal block, bound_block
+ assert_equal "hello", bound_block.call
+ end
end
end