diff options
author | Benoit Daloze <eregontp@gmail.com> | 2021-01-28 17:08:57 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2021-01-28 17:08:57 +0100 |
commit | 2e32b919b4f2f5b7f2e1509d6fa985526ef1f61c (patch) | |
tree | aedadac3c99ca0097c2bbeaa95830332d6fb9971 /spec/ruby/language/fixtures | |
parent | 1b377b32c8616f85c0a97e68758c5c2db83f2169 (diff) |
Update to ruby/spec@8cafaa5
Diffstat (limited to 'spec/ruby/language/fixtures')
-rw-r--r-- | spec/ruby/language/fixtures/constant_visibility.rb | 18 | ||||
-rw-r--r-- | spec/ruby/language/fixtures/squiggly_heredoc.rb | 8 |
2 files changed, 25 insertions, 1 deletions
diff --git a/spec/ruby/language/fixtures/constant_visibility.rb b/spec/ruby/language/fixtures/constant_visibility.rb index 022554430e..af38b2d8f2 100644 --- a/spec/ruby/language/fixtures/constant_visibility.rb +++ b/spec/ruby/language/fixtures/constant_visibility.rb @@ -65,7 +65,7 @@ module ConstantVisibility end end - class PrivConstModuleChild + class ClassIncludingPrivConstModule include PrivConstModule def private_constant_from_include @@ -77,6 +77,22 @@ module ConstantVisibility end end + module ModuleIncludingPrivConstModule + include PrivConstModule + + def self.private_constant_from_include + PRIVATE_CONSTANT_MODULE + end + + def self.private_constant_self_from_include + self::PRIVATE_CONSTANT_MODULE + end + + def self.private_constant_named_from_include + PrivConstModule::PRIVATE_CONSTANT_MODULE + end + end + class PrivConstClassChild < PrivConstClass def private_constant_from_subclass PRIVATE_CONSTANT_CLASS diff --git a/spec/ruby/language/fixtures/squiggly_heredoc.rb b/spec/ruby/language/fixtures/squiggly_heredoc.rb index d223966b93..984a629e5b 100644 --- a/spec/ruby/language/fixtures/squiggly_heredoc.rb +++ b/spec/ruby/language/fixtures/squiggly_heredoc.rb @@ -29,6 +29,14 @@ module SquigglyHeredocSpecs HERE end + def self.backslash + <<~HERE + a + b\ + c + HERE + end + def self.least_indented_on_the_first_line <<~HERE a |