aboutsummaryrefslogtreecommitdiffstats
path: root/struct.c
Commit message (Collapse)AuthorAgeFilesLines
* hash.c: detect recursion for allnobu2013-12-031-21/+13
| | | | | | | * hash.c (rb_hash): detect recursion for all `hash' methods. each `hash' methods no longer need to use rb_exec_recursive(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* should not ignore the rest of recursive constructsnobu2013-11-261-1/+1
| | | | | | | | | | | | | * array.c (rb_ary_hash): should not ignore the rest of recursive constructs. * hash.c (rb_hash_hash): ditto. * range.c (range_hash): ditto. * struct.c (rb_struct_hash): ditto. * test/-ext-/test_recursion.rb (TestRecursion): separate from test/ruby/test_thread.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().glass2013-11-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: fix warning messagenobu2013-10-271-1/+1
| | | | | | * struct.c (new_struct): fix warning message, class name and encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c: [DOC] grammar of ArgumentError in Struct.new [Bug #8936]zzak2013-09-261-1/+2
| | | | | | | Patch by Prathamesh Sonpatki git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: rename RARRAY_RAWPTR() to RARRAY_CONST_PTR().ko12013-09-251-8/+8
| | | | | | | | | | | | | | | RARRAY_RAWPTR(ary) returns (const VALUE *) type pointer and usecase of this macro is not acquire raw pointer, but acquire read-only pointer. So we rename to better name. RSTRUCT_RAWPTR() is also renamed to RSTRUCT_CONST_PTR() (I expect that nobody use it). * array.c, compile.c, cont.c, enumerator.c, gc.c, proc.c, random.c, string.c, struct.c, thread.c, vm_eval.c, vm_insnhelper.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (rb_struct_define_without_accessor_under): added.ko12013-08-291-14/+46
| | | | | | | | | | This function is similar to rb_define_class_under() against rb_define_class(). * include/ruby/intern.h: add a declaration of this function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_splice): use RARRAY_PTR_USE() without WB becauseko12013-08-261-2/+2
| | | | | | | | | | | | | there are not new relations. * enum.c (enum_sort_by): ditto. * struct.c (setup_struct): use RARRAY_RAWPTR(). * vm_eval.c (yield_under): ditto. * ext/pathname/pathname.c (path_entries): use RARRAY_AREF(). * ext/pathname/pathname.c (path_s_glob): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: rb_struct_define_undernobu2013-08-031-0/+19
| | | | | | | | * struct.c (rb_struct_define_under): new function to define Struct under the given namespace, not under Struct. [Feature #8264] * ext/etc/etc.c: use rb_struct_define_under. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (rb_struct_each_pair): use rb_yield_values(2, key, value)glass2013-07-151-4/+13
| | | | | | | instead of rb_yield(rb_assoc_new(key, value)) if rb_block_arity() is greater than 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* intern.h: define rb_enumerator_size_funcnobu2013-06-261-3/+9
| | | | | | | | * include/ruby/intern.h (rb_enumerator_size_func): define strict function declaration for rb_enumeratorize_with_size(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: support write barrier protection for T_STRUCT.ko12013-06-211-65/+61
| | | | | | | | | | | | | | | | Introduce the following C APIs: * RSTRUCT_RAWPTR(st) returns pointer (do WB on your risk). The type of returned pointer is (const VALUE *). * RSTRUCT_GET(st, idx) returns idx-th value of struct. * RSTRUCT_SET(st, idx, v) set idx-th value by v with WB. And * RSTRUCT_PTR(st) returns pointer with shady operation. The type of returned pointer is (VALUE *). * struct.c, re.c, gc.c, marshal.c: rewrite with above APIs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c: Improve documentation: replace "instance variable" withdrbrain2013-06-111-92/+91
| | | | | | | | "member", recommend the use of a block to customize structs, note that member accessors are created, general cleanup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (numberof): Gathered from various files.akr2013-06-071-1/+0
| | | | | | | | | | * 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
* * *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko12013-05-131-1/+1
| | | | | | | | instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: hide member namesnobu2013-04-131-3/+3
| | | | | | | | * struct.c (rb_struct_define_without_accessor, rb_struct_define), (rb_struct_s_def): hide member names array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: split make_structnobu2013-04-131-34/+53
| | | | | | | | * struct.c (anonymous_struct, new_struct, setup_struct): split make_struct() for each purpose. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: avoid inadvertent symbol creationnobu2013-04-041-7/+24
| | | | | | | | | * struct.c (make_struct): avoid inadvertent symbol creation. (rb_struct_aref): ditto. (rb_struct_aset): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (Struct.new): Document Struct.new with blockzzak2013-01-191-3/+14
| | | | | | | Patch by Hiroyuki Iwatsuki [Bug #7674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (make_struct): remove junk ID check to allow members whoglass2012-12-221-8/+6
| | | | | | | | have junk name like "foo\000". * test/ruby/test_struct.rb: Test for above. [Bug #7575] [ruby-dev:46750] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: fix typonobu2012-11-191-1/+1
| | | | | | * struct.c (rb_struct_each_pair): fix typo. [Bug #7382] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: yield assoc in each_pairnobu2012-11-191-1/+3
| | | | | | | | * struct.c (rb_struct_each_pair): yield associated pairs so that an unsplat argument can get both, for consistency with Hash, OpenStruct, and etc. [ruby-dev:46533] [Bug #7382] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c: Support for Struct's enumerators #sizemarcandre2012-11-061-3/+6
| | | | | | [Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c: fix typo.ktsj2012-10-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: add C APIs.nari2012-10-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VALUE rb_newobj_of(VALUE klass, VALUE flags) #define NEWOBJ_OF(obj,type,klass,flags) These allow to change a allocation strategy depending on klass or flags. * gc.c: ditto * array.c: use new C API. * bignum.c: ditto * class.c: ditto * complex.c: ditto * ext/socket/ancdata.c: ditto * ext/socket/option.c: ditto * hash.c: ditto * io.c: ditto * marshal.c: ditto * numeric.c: ditto * object.c: ditto * random.c: ditto * range.c: ditto * rational.c: ditto * re.c: ditto * string.c: ditto * struct.c: ditto [Feature #7177][Feature #7047] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* obj_init_copynobu2012-06-051-5/+1
| | | | | | * object.c (rb_obj_init_copy): should check if trusted too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (rb_struct_members): Refactoring. As Struct#members hadmame2012-05-211-11/+2
| | | | | | | | | | returned an array of String, the old code was needed to convert Symbols to Strings. But it is almost unnecessary because the method now returns an array of Symbols. A patch by Masaki Matsushita <glass.saga at gmail dot com> [Feature #6218] [ruby-dev:45451] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.nobu2012-04-241-0/+26
| | | | | | | [Feature #6276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r35339-35343 because of no tests.naruse2012-04-181-26/+0
| | | | | | | | | | | | | | * hash.c: Alias ENV.to_h to ENV.to_hash [ref #6276] * lib/ostruct.rb: Add OpenStruct#to_h [Feature #6276] * struct.c: Add Struct#to_h [Feature #6276] * object.c: Add NilClass#to_h [Feature #6276] * hash.c: Add Hash#to_h [Feature #6276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c: Add Struct#to_h [Feature #6276]marcandre2012-04-161-0/+26
| | | | | | [ref #4862] [rubyspec:2082ef46d46e] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (trace_ev): Removed "not reached" comment as this line isdrbrain2012-04-141-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reached. * variable.c (rb_obj_remove_instance_variable): Replaced "not reached" comment with the UNREACHABLE macro. * variable.c (rb_mod_const_missing): ditto. * variable.c (rb_mod_remove_cvar): ditto. * enum.c (first_i): ditto. * string.c (rb_str_aref): ditto. * string.c (str_byte_aref): ditto. * string.c (rb_to_id): ditto. * io.c (rb_io_fmode_modestr): ditto. * io.c (rb_io_oflags_modestr): ditto. * pack.c (num2i32): ditto. * vm_eval.c (rb_method_missing): ditto. * vm_eval.c (rb_f_throw): ditto. * dir.c (dir_read): ditto. * win32/win32.c (child_result): ditto. * struct.c (rb_struct_getmember): ditto. * struct.c (rb_struct_set): ditto. * struct.c (rb_struct_aref_id): ditto. * eval.c (rb_f_raise): ditto. * process.c (rb_f_exit_bang): ditto. * process.c (rb_f_exit): ditto. * process.c (rb_f_abort): ditto. * ext/-test-/iter/break.c (iter_break_value): ditto. * ext/pty/pty.c (pty_check): ditto. * ext/openssl/ossl_pkey.c (ossl_pkey_new): ditto. * ext/readline/readline.c (rb_remove_history): ditto. * ext/stringio/stringio.c (strio_unimpl): ditto. * numeric.c (num_sadded): ditto. * numeric.c (num_init_copy): ditto. * numeric.c (rb_num2ll): ditto. * numeric.c (rb_num2ull): ditto. * vm_insnhelper.c (call_cfunc): ditto. * ruby.c (opt_W_getter): ditto. * bignum.c (rb_big_coerce): ditto. * file.c (rb_f_test): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "controldrbrain2012-04-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reaches end of non-void function" warnings. [ruby-trunk - Bug #6066] * re.c (name_to_backref_number): ditto. * object.c (rb_Float): ditto. * io.c (io_readpartial): ditto. * io.c (io_read_nonblock): ditto. * pack.c (rb_uv_to_utf8): ditto. * proc.c (rb_method_entry_arity): ditto. * vm_method.c (rb_f_notimplement): ditto. * struct.c (rb_struct_aset_id): ditto. * class.c (rb_scan_args): ditto. * process.c (rlimit_resource_type): ditto. * process.c (rlimit_resource_value): ditto. * process.c (p_uid_switch): ditto. * process.c (p_gid_switch): ditto. * ext/digest/digest.c (rb_digest_instance_update): ditto. * ext/digest/digest.c (rb_digest_instance_finish): ditto. * ext/digest/digest.c (rb_digest_instance_reset): ditto. * ext/digest/digest.c (rb_digest_instance_block_length): ditto. * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto. * ext/dl/handle.c (rb_dlhandle_close): ditto. * ext/tk/tcltklib.c (pending_exception_check0): ditto. * ext/tk/tcltklib.c (pending_exception_check1): ditto. * ext/tk/tcltklib.c (ip_cancel_eval_core): ditto. * ext/tk/tcltklib.c (lib_get_reltype_name): ditto. * ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto. * ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto. * ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto. * ext/fiddle/conversions.c (generic_to_value): ditto. * ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto. * ext/socket/socket.c (sock_s_getnameinfo): ditto. * ext/ripper/eventids2.c (ripper_token2eventid): ditto. * cont.c (return_fiber): ditto. * dmydln.c (dln_load): ditto. * vm_insnhelper.c (vm_search_normal_superclass): ditto. * bignum.c (big_fdiv): ditto. * marshal.c (r_symlink): ditto. * marshal.c (r_symbol): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c (documentation for rb_struct_members_m):duerst2012-04-061-1/+1
| | | | | | | fix 'array of strings' to 'array of symbols' [ruby-core:44152][Bug #6264] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h: Add rb_check_arity, rb_error_arity [#6085]marcandre2012-03-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * array.c: Use rb_check_arity / rb_error_arity * class.c: ditto * enumerator.c: ditto * eval.c: ditto * file.c: ditto * hash.c: ditto * numeric.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * re.c: ditto * signal.c: ditto * string.c: ditto * struct.c: ditto * transcode.c: ditto * vm_eval.c: ditto * vm_insnhelper.c: ditto & implementation of rb_error_arity * test/ruby/test_arity.rb: tests for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * use RB_TYPE_P which is optimized for constant types, instead ofnobu2011-09-291-6/+6
| | | | | | comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (rb_check_trusted): new function to check an object isnobu2011-07-171-2/+1
| | | | | | | | trusted. * struct.c (rb_struct_modify), time.c (time_modify): check by the above function to show proper class names. [Bug #5036] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: add for internal use only.nobu2011-05-181-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (random_rand): remove unused variables.naruse2011-04-251-2/+0
| | | | | | | | | | | | | | * struct.c (rb_struct_define_without_accessor): ditto. * strftime.c (rb_strftime_with_timespec): ditto. * sprintf.c: ditto. * time.c (time_asctime): remove useless GetTimeval(). * thread_pthread.c: cast to (void *) for %p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, gc.c, hash.c, object.c, string.c, struct.c,nobu2010-10-241-1/+1
| | | | | | | | transcode.c, variable.c, vm.c, vm_insnhelper.c, vm_method.c: replace calls to rb_error_frozen() with rb_check_frozen(). a patch from Run Paint Run Run at [ruby-core:32014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Commit miss.nobu2010-10-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_sprintf.rb: fix ML ref. [ruby-core:32848]nobu2010-10-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Documentation: change => in call-seq to ->.marcandre2010-05-171-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Harmonize documentation, in particular regarding:marcandre2010-05-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - methods returning enumerators - array methods and argument naming (array -> ary, an_array -> new_ary) - minor improvements, typo fixed and styling issues Other documentation errors fixed: - return value was self instead of a new array (or vice-versa) for Array#{pop,shift,permutation,repeated_permutation,keep_if} - Array#rindex was missing the form with a block. * dir.c: ditto. * enum.c: ditto. Modified Enumerable#reverse_each' documentation to clarify that #each will be finish before any element is yielded. * error.c: ditto. * gc.c: ditto. * hash.c: ditto. * io.c: ditto. IO#{codepoints,each_codepoint} fixed as per [ruby-core:23948] * numeric.c: ditto. * range.c: ditto. * string.c: ditto. * struct.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_long2int): evalates the argument onlynobu2009-10-071-1/+1
| | | | | | | | | once. * struct.c (rb_struct_alloc): check array length overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (rb_struct_select): Struct#select should returnmatz2009-10-061-0/+1
| | | | | | enumerator when no block given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_{times, shuffle_bang, sample}): reducing macromatz2009-10-051-37/+63
| | | | | | | | | | | | | calls inside of the loop by keeping pointers in local variables. a patch from Masahiro Kanai (CanI) in [ruby-dev:39406]. It was found and fixed at Security and Programming camp 2009. * string.c (rb_str_{times, split_m}): ditto. * struct.c (rb_struct_{getmember, set, aref_id, aset_id}, {make, inspect}_struct, recursive_{equal, hash, eql}): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c (rb_struct_equal, rb_struct_eql): Handle comparison of recursive ↵marcandre2009-09-201-12/+26
| | | | | | | | structures [ruby-core:24759] * range.c (range_eq, range_eql): ditto for ranges git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_exec_recursive_outer, rb_exec_recursive): Added method to ↵marcandre2009-09-151-7/+6
| | | | | | | | | | | | | | | | | | short-circuit to the outermost level in case of recursion * test/ruby/test_thread.rb (test_recursive_outer): Test for above * hash.c (rb_hash_hash): Return a sensible hash for in case of recursion [ruby-core:24648] * range.c (rb_range_hash): ditto * struct.c (rb_struct_hash): ditto * array.c (rb_array_hash): ditto * test/ruby/test_array.rb (test_hash2): test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/st.h (st_hash_func): use st_index_t.nobu2009-09-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_define_class_id_under, rb_define_module_id_under):nobu2009-08-121-10/+11
| | | | | | | | | | | | new functions to define a nested class/module with non-ascii name. * struct.c (make_struct): use name with encoding. * struct.c (inspect_struct): ditto. [ruby-core:24849] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e