diff options
| author | take_cheeze <[email protected]> | 2014-03-06 03:40:41 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-03-06 03:40:41 +0900 |
| commit | f8270ee59bfbeb46a267312e49a4d39a236f0e7e (patch) | |
| tree | 91df80ea347bad575bf41eb5408b3d796caa236d /mrbgems/mruby-proc-ext/test | |
| parent | b8625bbc5ec17fbe47387ec2041b7f6299fb4565 (diff) | |
| download | mruby-f8270ee59bfbeb46a267312e49a4d39a236f0e7e.tar.gz mruby-f8270ee59bfbeb46a267312e49a4d39a236f0e7e.zip | |
fix and add test for Proc#source_location
Diffstat (limited to 'mrbgems/mruby-proc-ext/test')
| -rw-r--r-- | mrbgems/mruby-proc-ext/test/proc.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mrbgems/mruby-proc-ext/test/proc.rb b/mrbgems/mruby-proc-ext/test/proc.rb index abbd7a9d9..ef8b7f31c 100644 --- a/mrbgems/mruby-proc-ext/test/proc.rb +++ b/mrbgems/mruby-proc-ext/test/proc.rb @@ -1,6 +1,13 @@ ## # Proc(Ext) Test +assert('Proc#source_location') do + loc = Proc.new {}.source_location + next true if loc.nil? + assert_equal loc[0][-7, 7], 'proc.rb' + assert_equal loc[1], 5 +end + assert('Proc#lambda?') do assert_true lambda{}.lambda? assert_true !Proc.new{}.lambda? |
