Skip to content

Commit 0dd6082

Browse files
committed
[GR-16761] Kernel#then.
PullRequest: truffleruby/917
2 parents 36518f3 + 46ee421 commit 0dd6082

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Compatibility:
2121
* Implemented `rb_enc_sprintf` (#1702).
2222
* Implemented `ENV#{filter,filter!}` aliases for `select` and `select!`.
2323
* Non-blocking `StringIO` and `Socket` APIs now support `exception: false` like MRI (#1702).
24+
* Added `Kernel#then` (#1703).
2425

2526
Changes:
2627

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)