summaryrefslogtreecommitdiff
path: root/test/ruby/namespace/singleton_methods.rb
diff options
context:
space:
mode:
authorSatoshi Tagomori <s-tagomori@sakura.ad.jp>2025-11-05 13:52:45 +0900
committerSatoshi Tagomori <tagomoris@gmail.com>2025-11-07 13:14:54 +0900
commit50b9d9d355b2c64101ebdd2f2de0e9010bb050dc (patch)
tree193329921f80fadeed58e20e42151d6c2eb18bf7 /test/ruby/namespace/singleton_methods.rb
parentf19b29d1dbb2918dee112b0df0cba2ca1165a399 (diff)
rename namespace.c (and others) to box.c
Diffstat (limited to 'test/ruby/namespace/singleton_methods.rb')
-rw-r--r--test/ruby/namespace/singleton_methods.rb65
1 files changed, 0 insertions, 65 deletions
diff --git a/test/ruby/namespace/singleton_methods.rb b/test/ruby/namespace/singleton_methods.rb
deleted file mode 100644
index 05470932d2..0000000000
--- a/test/ruby/namespace/singleton_methods.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-class String
- def self.greeting
- "Good evening!"
- end
-end
-
-class Integer
- class << self
- def answer
- 42
- end
- end
-end
-
-class Array
- def a
- size
- end
- def self.blank
- []
- end
- def b
- size
- end
-end
-
-class Hash
- def a
- size
- end
- class << self
- def http_200
- {status: 200, body: 'OK'}
- end
- end
- def b
- size
- end
-end
-
-module SingletonMethods
- def self.string_greeing
- String.greeting
- end
-
- def self.integer_answer
- Integer.answer
- end
-
- def self.array_blank
- Array.blank
- end
-
- def self.hash_http_200
- Hash.http_200
- end
-
- def self.array_instance_methods_return_size(ary)
- [ary.a, ary.b]
- end
-
- def self.hash_instance_methods_return_size(hash)
- [hash.a, hash.b]
- end
-end