diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-15 12:08:17 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-15 12:08:17 -0300 |
commit | 2f9f0829c6073531d8b35475fc164f914e2d37b0 (patch) | |
tree | 3f6cfae56eb1bb51fab8c86dd9f0d724e161e81b /activesupport/lib | |
parent | 3c8b50020a054b7e103725a7cf25d9c51d583a63 (diff) | |
download | rails-2f9f0829c6073531d8b35475fc164f914e2d37b0.tar.gz rails-2f9f0829c6073531d8b35475fc164f914e2d37b0.tar.bz2 rails-2f9f0829c6073531d8b35475fc164f914e2d37b0.zip |
Object#returning has gone, it's already deprecated on 3-0-stable
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/returning.rb | 43 |
2 files changed, 0 insertions, 44 deletions
diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb index d671da6711..790a26f5c1 100644 --- a/activesupport/lib/active_support/core_ext/object.rb +++ b/activesupport/lib/active_support/core_ext/object.rb @@ -2,7 +2,6 @@ require 'active_support/core_ext/object/acts_like' require 'active_support/core_ext/object/blank' require 'active_support/core_ext/object/duplicable' require 'active_support/core_ext/object/try' -require 'active_support/core_ext/object/returning' require 'active_support/core_ext/object/conversions' require 'active_support/core_ext/object/instance_variables' diff --git a/activesupport/lib/active_support/core_ext/object/returning.rb b/activesupport/lib/active_support/core_ext/object/returning.rb deleted file mode 100644 index c401992ccc..0000000000 --- a/activesupport/lib/active_support/core_ext/object/returning.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Object - # Returns +value+ after yielding +value+ to the block. This simplifies the - # process of constructing an object, performing work on the object, and then - # returning the object from a method. It is a Ruby-ized realization of the K - # combinator, courtesy of Mikael Brockman. - # - # ==== Examples - # - # # Without returning - # def foo - # values = [] - # values << "bar" - # values << "baz" - # return values - # end - # - # foo # => ['bar', 'baz'] - # - # # returning with a local variable - # def foo - # returning values = [] do - # values << 'bar' - # values << 'baz' - # end - # end - # - # foo # => ['bar', 'baz'] - # - # # returning with a block argument - # def foo - # returning [] do |values| - # values << 'bar' - # values << 'baz' - # end - # end - # - # foo # => ['bar', 'baz'] - def returning(value) - ActiveSupport::Deprecation.warn('Object#returning has been deprecated in favor of Object#tap.', caller) - yield(value) - value - end -end
\ No newline at end of file |