Skip to content

Commit

Permalink
Add an alias of Kernel#yield_self named #then.
Browse files Browse the repository at this point in the history
  • Loading branch information
dimameshcharakou committed Jun 9, 2019
1 parent 2f8100c commit 6a72ff5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions spec/tags/core/kernel/then_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/tags/truffle/methods_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ fails:Public methods on IO should not include pipe?
fails:Public methods on IO should not include read_bom_byte
fails:Public methods on IO should not include reset_buffering
fails:Public methods on IO should not include strip_bom
fails:Public methods on Kernel should include then
fails:Public methods on Numeric should include clone
fails:Public methods on Numeric should include dup
fails:Public methods on Range should include %
Expand Down
2 changes: 2 additions & 0 deletions src/main/ruby/truffleruby/core/kernel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ def yield_self
end
end

alias_method :then, :yield_self

def test(cmd, file1, file2=nil)
case cmd
when ?d
Expand Down

0 comments on commit 6a72ff5

Please sign in to comment.