From 1bd09d5d5d3bdcc447f21405ef6cd9fa4b95e4f6 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 19 May 2015 09:54:44 +0000 Subject: iseq.c: check srouce type * iseq.c (rb_iseq_compile_with_option): check srouce type, must be an IO or a String. [ruby-core:69219] [Bug #11159] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.c | 1 + 1 file changed, 1 insertion(+) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index a1346115e9..367f8b3327 100644 --- a/iseq.c +++ b/iseq.c @@ -582,6 +582,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) { -- cgit v1.2.3