aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/kernel/fixtures/classes.rb
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2019-07-14 23:41:43 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2019-12-21 09:08:52 -0500
commite0b336c8ce84e1456fc6126ca232289667db3e19 (patch)
tree44bc6033eb0e637356e9cbc2f02b6131a6a847ed /spec/ruby/core/kernel/fixtures/classes.rb
parentea405ee8ed00c03e0521ff4b852d8f3bea849243 (diff)
downloadruby-e0b336c8ce84e1456fc6126ca232289667db3e19.tar.gz
Add specs for calling into Kernel#lambda with super
Diffstat (limited to 'spec/ruby/core/kernel/fixtures/classes.rb')
-rw-r--r--spec/ruby/core/kernel/fixtures/classes.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/ruby/core/kernel/fixtures/classes.rb b/spec/ruby/core/kernel/fixtures/classes.rb
index 2909a621a9..2f2bbf1b23 100644
--- a/spec/ruby/core/kernel/fixtures/classes.rb
+++ b/spec/ruby/core/kernel/fixtures/classes.rb
@@ -337,6 +337,28 @@ module KernelSpecs
end
end
+ module LambdaSpecs
+ module ZSuper
+ def lambda
+ super
+ end
+ end
+
+ class ForwardBlockWithZSuper
+ prepend(ZSuper)
+ end
+
+ module Ampersand
+ def lambda(&block)
+ super(&block)
+ end
+ end
+
+ class SuperAmpersand
+ prepend(Ampersand)
+ end
+ end
+
class RespondViaMissing
def respond_to_missing?(method, priv=false)
case method