diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-06-03 16:45:12 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-06-03 16:47:04 +0900 |
| commit | 01a21085f6348b1f1b070f2c64a6ed71b6d5afce (patch) | |
| tree | 7de9a62c859e2afa924abd9920a1148aa816b7cc /test | |
| parent | 9775315240961a14cd6dd0cf51641c694c900149 (diff) | |
| download | mruby-01a21085f6348b1f1b070f2c64a6ed71b6d5afce.tar.gz mruby-01a21085f6348b1f1b070f2c64a6ed71b6d5afce.zip | |
add a few regressions test from #2313
The code was contributed from Carson McDonald (@carsonmcdonald)
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/class.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/t/class.rb b/test/t/class.rb index e2839111c..1b4b84890 100644 --- a/test/t/class.rb +++ b/test/t/class.rb @@ -375,6 +375,20 @@ assert('clone Class') do assert_true(Foo.clone.new.func) end +assert('class definition in singleton class') do + class AClassS + class << self + class BClass + end + + def iclass + BClass + end + end + end + assert_equal(Class, AClassS.iclass.class) +end + assert('class variable and class << self style class method') do class ClassVariableTest @@class_variable = "value" |
