Skip to content

Commit 3df4032

Browse files
Add an alias of Kernel#yield_self named #then.
1 parent 9f7339e commit 3df4032

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

spec/tags/core/kernel/then_tags.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

spec/tags/truffle/methods_tags.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ fails:Public methods on IO should not include encode_with
2727
fails:Public methods on IO should not include nonblock
2828
fails:Public methods on IO should not include nonblock=
2929
fails:Public methods on IO should not include nonblock?
30-
fails:Public methods on Kernel should include then
3130
fails:Public methods on Numeric should include clone
3231
fails:Public methods on Numeric should include dup
3332
fails:Public methods on Range should include %

src/main/ruby/truffleruby/core/kernel.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@ def yield_self
483483
end
484484
end
485485

486+
alias_method :then, :yield_self
487+
486488
def test(cmd, file1, file2=nil)
487489
case cmd
488490
when ?d

0 commit comments

Comments
 (0)