summaryrefslogtreecommitdiff
path: root/load.c
AgeCommit message (Collapse)Author
2015-12-08* introduce new ISeq binary format serializer/de-serializerko1
and a pre-compilation/runtime loader sample. [Feature #11788] * iseq.c: add new methods: * RubyVM::InstructionSequence#to_binary_format(extra_data = nil) * RubyVM::InstructionSequence.from_binary_format(binary) * RubyVM::InstructionSequence.from_binary_format_extra_data(binary) * compile.c: implement body of this new feature. * load.c (rb_load_internal0), iseq.c (rb_iseq_load_iseq): call RubyVM::InstructionSequence.load_iseq(fname) with loading script name if this method is defined. We can return any ISeq object as a result value. Otherwise loading will be continue as usual. This interface is not matured and is not extensible. So that we don't guarantee the future compatibility of this method. Basically, you should'nt use this method. * iseq.h: move ISEQ_MAJOR/MINOR_VERSION (and some definitions) from iseq.c. * encoding.c (rb_data_is_encoding), internal.h: added. * vm_core.h: add several supports for lazy load. * add USE_LAZY_LOAD macro to specify enable or disable of this feature. * add several fields to rb_iseq_t. * introduce new macro rb_iseq_check(). * insns.def: some check for lazy loading feature. * vm_insnhelper.c: ditto. * proc.c: ditto. * vm.c: ditto. * test/lib/iseq_loader_checker.rb: enabled iff suitable environment variables are provided. * test/runner.rb: enable lib/iseq_loader_checker.rb. * sample/iseq_loader.rb: add sample compiler and loader. $ ruby sample/iseq_loader.rb [dir] will compile all ruby scripts in [dir]. With default setting, this compile creates *.rb.yarb files in same directory of target .rb scripts. $ ruby -r sample/iseq_loader.rb [app] will run with enable to load compiled binary data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06introduce rb_autoload_str to replace rb_autoloadnormal
rb_autoload_str may be safer by preventing premature GC. It can also be more efficient by passing a pre-frozen string that can be deduped using rb_fstring. Common autoload callers (e.g. rubygems, rdoc) already use string literals as the file argument. There seems to be no reason to expose rb_autoload_str to the public C API since autoload is not performance-critical. Applications may declare autoloads in Ruby code or via rb_funcall; so merely deprecate rb_autoload without exposing rb_autoload_str to new users. Running: valgrind -v ruby -rrdoc -rubygems -e exit shows a minor memory reduction (32-bit userspace) before: in use at exit: 1,600,621 bytes in 28,819 blocks total heap usage: 55,786 allocs, 26,967 frees, 6,693,790 bytes allocated after: in use at exit: 1,599,778 bytes in 28,789 blocks total heap usage: 55,739 allocs, 26,950 frees, 6,692,973 bytes allocated * include/ruby/intern.h (rb_autoload): deprecate * internal.h (rb_autoload_str): declare * load.c (rb_mod_autoload): use rb_autoload_str * variable.c (rb_autoload): become compatibility wrapper (rb_autoload_str): hoisted out from old rb_autoload [ruby-core:71369] [Feature #11664] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-31internal.h: RUBY_DTRACE_HOOKnobu
* internal.h (RUBY_DTRACE_HOOK): extract from RUBY_DTRACE_CREATE_HOOK for other type hooks. * gc.c (RUBY_DTRACE_GC_HOOK): ditto. * parse.y (RUBY_DTRACE_PARSE_HOOK): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-13load.c (features_index_add): avoid repeat calculationnormal
Reduce cognitive overhead, eye strain and keep lines less than 80 columns to benefit users of giant fonts (honestly I prefer 64 column wrap :P). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12load.c: match comment with variable (`e' => `ext') [ci skip]normal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-31load.c: use rb_load_internal0nobu
* load.c (rb_require_internal): use rb_load_internal0 not to raise a exception to be caught. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-30load.c: stop separating exits at loadingnobu
* load.c (rb_load_internal0): stop separating exits at loading from exits from execution. TAG_FATAL is the only case that `errinfo` is a Fixnum, and should continue to exit by JUMP_TAG but not raising as an ordinary exception. [ruby-core:70169] [Bug #11404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-30load.c: avoid segfault when 'throw' occurs in the middle of rb_load_file_strnobu
How can a 'throw' happen while the current thread is reading a Ruby source file from disk and parsing it? It can happen if another thread calls Thread#raise, and passes an Exception object which responds to #exception, and the custom #exception method calls Kernel#throw. In practice, this is most likely to happen if you combine the use of autoload and Timeout.timeout. An extra check is required to avoid a segfault in this case. * load.c (rb_load_internal0): extra check before returning TAG_RAISE when a non-local transfer of control happens while loading and parsing a Ruby source file. [ruby-core:70169] [Bug #11404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-26load.c: use enumnobu
* load.c (rb_construct_expanded_load_path): use enum for the purpose. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* make rb_iseq_t T_IMEMO object (type is imemo_iseq).ko1
All contents of previous rb_iseq_t is in rb_iseq_t::body. Remove rb_iseq_t::self because rb_iseq_t is an object. RubyVM::InstructionSequence is wrapper object points T_IMEMO/iseq. So RubyVM::ISeq.of(something) method returns different wrapper objects but they point the same T_IMEMO/iseq object. This patch is big, but most of difference is replacement of iseq->xxx to iseq->body->xxx. (previous) rb_iseq_t::compile_data is also located to rb_iseq_t::compile_data. It was moved from rb_iseq_body::compile_data. Now rb_iseq_t has empty two pointers. I will split rb_iseq_body data into static data and dynamic data. * compile.c: rename some functions/macros. Now, we don't need to separate iseq and iseqval (only VALUE). * eval.c (ruby_exec_internal): `n' is rb_iseq_t (T_IMEMO/iseq). * ext/objspace/objspace.c (count_imemo_objects): count T_IMEMO/iseq. * gc.c: check T_IMEMO/iseq. * internal.h: add imemo_type::imemo_iseq. * iseq.c: define RubyVM::InstructionSequnce as T_OBJECT. Methods are implemented by functions named iseqw_.... * load.c (rb_load_internal0): rb_iseq_new_top() returns rb_iseq_t (T_IMEMO/iesq). * method.h (rb_add_method_iseq): accept rb_iseq_t (T_IMEMO/iseq). * vm_core.h (GetISeqPtr): removed because it is not T_DATA now. * vm_core.h (struct rb_iseq_body): remove padding for [Bug #10037][ruby-core:63721]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21load.c (ruby_dln_librefs): make staticnormal
This isn't used outside of load.c, so there appears to be no reason to expose it to other modules. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-18load.c: use TAG_RETURNnobu
* load.c (rb_require_internal): use TAG_RETURN not a magic number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-18load.c: reduce EXEC_TAGsnobu
* load.c (rb_load_internal0): do not raise any exceptions but return the result tag state. * load.c (rb_load_protect): reduce nested EXEC_TAGs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-16load.c: use fstring for loaded features and expanded load pathnormal
Loaded features is an obvious candidate for fstring since feature paths of Ruby sources are included in iseq locations, and iseq locations are in the fstring table anyways. Deduplicating expanded load path can reuse old objects, since since repeated expansions may recycle before old expanded paths are GC-ed away. * load.c (rb_construct_expanded_load_path): fstring expanded path (get_loaded_features_index): fstring feature path (rb_provide_feature): ditto [ruby-core:69871] [Feature #11331] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24load.c: use RB_GC_GUARDnobu
* load.c (rb_feature_provided): use RB_GC_GUARD for fullpath after last use of feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-03* vm_method.c: rename `rb_frame_...' to `rb_scope_...'.ko1
* eval_intern.h: move decl. of rb_scope_visibility_set() to method.h. * load.c: catch up this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-03* vm.c: eagerly allocate `loading_table`. This eliminates the need totenderlove
do NULL checks when looking up the `loading_table` hash. https://github.com/ruby/ruby/pull/918 * load.c: remove various NULL checks git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-03* method.h: split rb_method_definition_t::flag to several flags.ko1
`flag' contains several categories of attributes and it makes us confusion (at least, I had confused). * rb_method_visibility_t (flags::visi) * NOEX_UNDEF -> METHOD_VISI_UNDEF = 0 * NOEX_PUBLIC -> METHOD_VISI_PUBLIC = 1 * NOEX_PRIVATE -> METHOD_VISI_PRIVATE = 2 * NOEX_PROTECTED -> METHOD_VISI_PROTECTED = 3 * NOEX_SAFE(flag)) -> safe (flags::safe, 2 bits) * NOEX_BASIC -> basic (flags::basic, 1 bit) * NOEX_MODFUNC -> rb_scope_visibility_t in CREF * NOEX_SUPER -> MISSING_SUPER (enum missing_reason) * NOEX_VCALL -> MISSING_VCALL (enum missing_reason) * NOEX_RESPONDS -> BOUND_RESPONDS (macro) Now, NOEX_NOREDEF is not supported (I'm not sure it is needed). Background: I did not know what "NOEX" stands for. I asked Matz (who made this name) and his answer was "Nothing". "At first, it meant NO EXport (private), but the original meaning was gone." This is why I remove the mysterious word "NOEX" from MRI. * vm_core.h: introduce `enum missing_reason' to represent method_missing (NoMethodError) reason. * eval_intern.h: introduce rb_scope_visibility_t to represent scope visibility. It has 3 method visibilities (public/private/protected) and `module_function`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31* eval_intern.h, vm_method.c: move macros to functions.ko1
* SCOPE_TEST(f) -> rb_frame_visibility_test(flag). * SCOPE_CHECK(f) -> rb_frame_visibility_check(flag). * SCOPE_SET(f) -> rb_frame_visibility_set(flag). * load.c (load_ext): use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-16* load.c (loaded_feature_path): stop returning false negatives fortenderlove
filenames which are trailing substrings of file extensions. For example, 'b', which a trailing substring of ".rb" should not return false. [Bug #11155][ruby-core:69206] * test/ruby/test_autoload.rb: test for fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* load.c: removed unused header file "node.h".ko1
* method.h: ditto. * symbol.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* internal.h: use T_IMEMO to represent `struct MEMO' value.ko1
memo->v1 and memo->v2 is WB protected values. So use MEMO_V1/V2_SET() macros to set these values. memo->u3 is ambiguous (sometimes a VALUE, sometimes an integer value), so use gc_mark_maybe() in gc.c to mark it. Rename NEW_MEMO() to MEMO_NEW(). Move MEMO_FOR and NEW_MEMO_FOF macros from node.h. Export a rb_imemo_new() function for ext/ripper. * node.h: remove NODE_MEMO. * enum.c: catch up these change. * enumerator.c: ditto. * load.c: ditto. * ext/objspace/objspace.c (count_nodes): ditto. * gc.c (gc_mark_children): mark imemo_memo type. * parse.y (new_args_gen): use T_IMEMO. (I'm not sure it is working correctly...) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11* internal.h: define struct MEMO.ko1
* enum.c: use MEMO. * enumerator.c: ditto. * load.c: ditto. * node.h: return (struct MEMO *) pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24eval.c: use the given threadnobu
* eval.c (setup_exception): use the given thread instead of implicit current thread. * load.c (rb_load_internal0): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03load.c: reset errinfonobu
* load.c (ruby_require_internal): ignore error detail, just return an error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03encoding.c: load by rb_require_internalnobu
* encoding.c (load_encoding): use rb_require_internal instead of calling rb_require_safe with protection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03load.c: defer static linked initnobu
* enc/encinit.c.erb (Init_enc): initialize encdb and transdb directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03load.c: tweak the return valuenobu
* load.c (rb_require_internal): tweak the return value, 1 and 0 correspond to true and false in Kernel#require, respectively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03dmyenc.c: try to load encdbnobu
* load.c (ruby_require_internal): separate from rb_require_safe, not to raise exceptions. * ruby.c (process_options): remove unnatural encoding search. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* internal.h: Include ruby.h and ruby/encoding.h to beakr
includable without prior inclusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-29load.c: transcode pathnobu
* load.c (rb_f_load): path name needs to be transcoded to OS path encoding. [ruby-list:49994] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30protoize no-arguments functionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09* parse.y: change Symbol <-> ID relationship to avoidko1
exposing IDs from collectable symbols. [Bug #10014] Now, rb_check_id() returns 0 if corresponding symbol is pinned dynamic symbol. There is remaining intern_cstr_without_pindown(), it can return IDs from collectable symbols. We must be careful to use it (only used in parse.y). I think it should be removed if it does not have impact for performance. * parse.y: add: * STATIC_SYM2ID() * STATIC_ID2SYM() rename: * rb_pin_dynamic_symbol() -> dsymbol_pindown() * internal.h: remove: * rb_check_id_without_pindown() * rb_sym2id_without_pindown() add: * rb_check_symbol() * rb_check_symbol_cstr() * load.c: use rb_check_id() or rb_check_id_cstr(). * object.c: ditto. * struct.c: ditto. * thread.c: ditto. * vm_method.c: ditto. * string.c (sym_find): use only rb_check_symbol(). * sprintf.c (rb_str_format): use rb_check_symbol_cstr(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-26* parse.y: support Symbol GC. [ruby-trunk Feature #9634]nari
See this ticket about Symbol GC. * include/ruby/ruby.h: Declare few functions. * rb_sym2id: almost same as old SYM2ID but support dynamic symbols. * rb_id2sym: almost same as old ID2SYM but support dynamic symbols. * rb_sym2str: almost same as `rb_id2str(SYM2ID(sym))` but not pin down a dynamic symbol. Declare a new struct. * struct RSymbol: represents a dynamic symbol as object in Ruby's heaps. Add few macros. * STATIC_SYM_P: check a static symbol. * DYNAMIC_SYM_P: check a dynamic symbol. * RSYMBOL: cast to RSymbol * gc.c: declare RSymbol. support T_SYMBOL. * internal.h: Declare few functions. * rb_gc_free_dsymbol: free up a dynamic symbol. GC call this function at a sweep phase. * rb_str_dynamic_intern: convert a string to a dynamic symbol. * rb_check_id_without_pindown: not pinning function. * rb_sym2id_without_pindown: ditto. * rb_check_id_cstr_without_pindown: ditto. * string.c (Init_String): String#intern and String#to_sym use rb_str_dynamic_intern. * template/id.h.tmpl: use LSB of ID as a flag for determining a static symbol, so we shift left other ruby_id_types. * string.c: use rb_sym2str instead `rb_id2str(SYM2ID(sym))` to avoid pinning. * load.c: use xx_without_pindown function at creating temporary ID to avoid pinning. * object.c: ditto. * sprintf.c: ditto. * struct.c: ditto. * thread.c: ditto. * variable.c: ditto. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02load.c (ruby_init_ext): make idempotent to suppress warningsnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14load.c: call initnobu
* load.c (register_init_ext): call initialization function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* load.c (features_index_add_single): Move loaded_features_index array ↵tmm1
values off the ruby heap. [Bug #9201] [ruby-core:58805] * load.c (loaded_features_index_clear_i): Clean up off-heap array structure. * vm.c (rb_vm_mark): Remove unnecessary mark_tbl for loaded_features_index. This improves minor GC time by 15% in a large application. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03load.c: defer initalization of static-linked-extnobu
* load.c (rb_feature_p): deal with default loadable suffixes. * load.c (load_lock): initialize statically linked extensions. * load.c (search_required, rb_require_safe): deal with statically linked extensions. * load.c (ruby_init_ext): defer initalization of statically linked extensions until required actually. [Bug #8883] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01load.c: suppress warningnobu
* load.c (rb_load_internal): split to suppress false "clobbered" warning by gcc 4.4.5. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-01load.c: use local variablenobu
* load.c (rb_load_internal): use local variable th instead of GET_THREAD() for each time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28load.c: share feature namesnobu
* load.c (ruby_init_ext): share feature names between frame name and provided features. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-08load.c: display backtrace to $stderrnobu
* load.c (load_lock): display backtrace to $stderr at circular require. * vm_backtrace.c (rb_backtrace_print_to): new function to print backtrace to the given output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26load.c: search in OS path encodingnobu
* load.c (rb_load_internal): use rb_load_file_str() to keep path encoding. * load.c (rb_require_safe): search in OS path encoding for Windows. * ruby.c (rb_load_file_str): load file with keeping path encoding. * win32/file.c (rb_file_load_ok): use WCHAR type API assuming incoming path is encoded in UTF-8. [ruby-core:56136] [Bug #8676] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22load.c: suppress warningnobu
* load.c (rb_load_internal): suppress clobbered-by-longjmp warning by gcc 4.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-07* internal.h (numberof): Gathered from various files.akr
* array.c, math.c, thread_pthread.c, iseq.c, enum.c, string.c, io.c, load.c, compile.c, struct.c, eval.c, gc.c, parse.y, process.c, error.c, ruby.c: Remove the definitions of numberof. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-23load.c: fix invalid readnobu
* load.c (loaded_feature_path): fix invalid read by index underflow. the beginning of name is also a boundary as well as just after '/'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko1
instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-05* load.c (features_index_add): use rb_str_subseq() to specify C stringshirosaki
position properly to fix require non ascii path. [ruby-core:53733] [Bug #8165] * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path): a test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-24load.c: no longer used variable and objectnobu
* load.c (rb_feature_p): remvoe variable and string object which are no longer used since r39874. [Bug #8048] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e