summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-19 16:48:49 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-19 16:48:49 +0000
commit73a48a1482ff18c7c5f39adeb403206b8fb6e37e (patch)
tree8c6a853f7bc6454235bb1b442e24b9f8b0e66f3d /iseq.c
parentc4e2e5df814e77bfa19dc3ee5e5f907e4f368db9 (diff)
merge revision(s) 50541,50542: [Backport #11159]
* iseq.c (rb_iseq_compile_with_option): check srouce type, must be an IO or a String. [ruby-core:69219] [Bug #11159] * iseq.c (rb_iseq_compile_with_option): check source type, must be git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index de65dcbf33..9cf5df66a0 100644
--- a/iseq.c
+++ b/iseq.c
@@ -596,6 +596,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE absolute_path, VALUE li
if (RB_TYPE_P((src), T_FILE))
node = rb_parser_compile_file_path(parser, file, src, ln);
else {
+ StringValue(src);
node = rb_parser_compile_string_path(parser, file, src, ln);
if (!node) {