summaryrefslogtreecommitdiff
path: root/spec/ruby/core/kernel/yield_self_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/kernel/yield_self_spec.rb')
-rw-r--r--spec/ruby/core/kernel/yield_self_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/core/kernel/yield_self_spec.rb b/spec/ruby/core/kernel/yield_self_spec.rb
index 4aa5335db51..0bcf0660c2f 100644
--- a/spec/ruby/core/kernel/yield_self_spec.rb
+++ b/spec/ruby/core/kernel/yield_self_spec.rb
@@ -20,5 +20,10 @@ ruby_version_is "2.5" do
enum.peek.should equal object
enum.first.should equal object
end
+
+ it "has an alias `then`" do
+ object = Object.new
+ object.then { 42 }.should equal 42
+ end
end
end