Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an alias of Kernel#yield_self named #then. #1703

Merged
merged 1 commit into from
Jun 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -27,7 +27,6 @@ fails:Public methods on IO should not include encode_with
fails:Public methods on IO should not include nonblock
fails:Public methods on IO should not include nonblock=
fails:Public methods on IO should not include nonblock?
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