summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/kernel.rb b/kernel.rb
index 541d0cfd9d..b3da289053 100644
--- a/kernel.rb
+++ b/kernel.rb
@@ -135,21 +135,7 @@ module Kernel
yield(self)
end
- #
- # call-seq:
- # obj.yield_self {|x| block } -> an_object
- #
- # Yields self to the block and returns the result of the block.
- #
- # "my string".yield_self {|s| s.upcase } #=> "MY STRING"
- #
- def yield_self
- Primitive.attr! :inline_block
- unless defined?(yield)
- return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, rb_obj_size)'
- end
- yield(self)
- end
+ alias yield_self then
module_function