diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-08-12 04:19:17 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-08-12 04:19:17 +0900 |
| commit | a2a4563eaf6a29c3fb2c6b4289e2f197ee752c9e (patch) | |
| tree | d764cd6666249c33923c3682c046d6347be0f7b3 /test/t/kernel.rb | |
| parent | c9fe903fe15e601900ec17ae40fe82b0d2dc4978 (diff) | |
| download | mruby-a2a4563eaf6a29c3fb2c6b4289e2f197ee752c9e.tar.gz mruby-a2a4563eaf6a29c3fb2c6b4289e2f197ee752c9e.zip | |
check inside of result from Kernel#instance_variable
Diffstat (limited to 'test/t/kernel.rb')
| -rw-r--r-- | test/t/kernel.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/t/kernel.rb b/test/t/kernel.rb index b96e85134..5978b020d 100644 --- a/test/t/kernel.rb +++ b/test/t/kernel.rb @@ -217,7 +217,13 @@ assert('Kernel#inspect', '15.3.1.3.17') do end assert('Kernel#instance_variables', '15.3.1.3.23') do - instance_variables.class == Array + o = Object.new + o.instance_eval do + @a = 11 + @b = 12 + end + ivars = o.instance_variables + ivars.class == Array and ivars.size == 2 and ivars.include?(:@a) and ivars.include?(:@b) end assert('Kernel#is_a?', '15.3.1.3.24') do |
