From 54716fe7ebbf20b5e91fdbe9b65e0bedb0c4836a Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 23 Oct 2015 19:02:55 +0000 Subject: * ruby.c: introduce --enable-frozen-string-literal-debug option. If this option is enabled, the modify error will be: can't modify frozen String (RuntimeError) => can't modify frozen String, created at test.rb:3 (RuntimeError) * iseq.h: add compile option frozen_string_literal_debug. * compile.c: catch up this fix. * error.c (rb_error_frozen): ditto. * iseq.c (set_compile_option_from_hash): ditto. * test/ruby/test_rubyoptions.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52257 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 f72bcd76cd..587b49c4ad 100644 --- a/iseq.c +++ b/iseq.c @@ -366,6 +366,7 @@ set_compile_option_from_hash(rb_compile_option_t *option, VALUE opt) SET_COMPILE_OPTION(option, opt, stack_caching); SET_COMPILE_OPTION(option, opt, trace_instruction); SET_COMPILE_OPTION(option, opt, frozen_string_literal); + SET_COMPILE_OPTION(option, opt, frozen_string_literal_debug); SET_COMPILE_OPTION_NUM(option, opt, debug_level); #undef SET_COMPILE_OPTION #undef SET_COMPILE_OPTION_NUM -- cgit v1.2.3