diff options
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -861,9 +861,14 @@ iseqw_s_compile(int argc, VALUE *argv, VALUE self) case 3: path = argv[--i]; case 2: file = argv[--i]; } + if (NIL_P(file)) file = rb_fstring_cstr("<compiled>"); + if (NIL_P(path)) path = file; if (NIL_P(line)) line = INT2FIX(1); + Check_Type(path, T_STRING); + Check_Type(file, T_STRING); + return iseqw_new(rb_iseq_compile_with_option(src, file, path, line, 0, opt)); } |