summaryrefslogtreecommitdiff
path: root/range.c
AgeCommit message (Collapse)Author
2009-10-02* range.c (discrete_object_p): needs the argument type to get ridnobu
of truncation on platforms where VALUE is larger than int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-30* time.c (rb_time_succ): make Time#succ obsolete since time is notmatz
a discrete value. * range.c (discrete_object_p): treat time objects specially to determine discrete values, since time objects have #succ yet are discrete (for now at least). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* range.c: fixed type.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-20* struct.c (rb_struct_equal, rb_struct_eql): Handle comparison of recursive ↵marcandre
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
2009-09-15* thread.c (rb_exec_recursive_outer, rb_exec_recursive): Added method to ↵marcandre
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
2009-09-08* include/ruby/st.h (st_hash_func): use st_index_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-17* range.c (range_step): treat symbols specially so that iteratingmatz
over symbols should work like strings. [ruby-core:24780] * range.c (range_each): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-17* range.c (range_each): should honor to_str conversion.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05* range.c (range_eql, range_eq): fixed equality to work formatz
subclasses of Range. a patch from Marc-Andre Lafortune. [ruby-core:22190] * test/ruby/test_range.rb: add assertions for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17* range.c (recursive_hash): extracted from range_hash. rejectakr
recursive key. (range_hash): use recursive_hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16* bignum.c (rb_big_new, rb_bigzero_p), range.c (rb_range_values):nobu
added for random.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01* hash.c (rb_hash_hash): documentation fix. a patch frommatz
Marc-Andre Lafortune. [ruby-core:23943] * object.c (rb_mod_cmp): ditto. * range.c (range_eq): ditto. * string.c (rb_str_partition, rb_str_rpartition): ditto. * struct.c (rb_struct_s_def): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-07* range.c (r_le): fixed types.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-07* range.c (range_eql): fixed rdoc.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23* range.c (range_each): check #succ only when it is reallymatz
needed. small performance improvement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* string.c (rb_hash_uint32, rb_hash_uint, rb_hash_start, rb_hash_end),mame
include/ruby/intern.h: add Murmurhash API. [ruby-dev:37784] * complex.c (nucomp_hash), array.c (rb_ary_hash), time.c (time_hash), string.c (rb_str_hsah), object.c (rb_obj_hash), range.c (range_hash), struct.c (rb_struct_hash), hash.c (rb_any_hash), rational.c (nurat_hash): use Murmurhash. [ruby-dev:37784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04* range.c (range_step): should not add up errors on loops.matz
[ruby-dev:37691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04* range.c (range_max): max value from ... not defined for nonmatz
Integer Numeric end values. [ruby-dev:37690] fix: #974 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04* numeric.c (ruby_float_step): extracted from num_step().nobu
* range.c (range_step): uses ruby_float_step() for float range. [ruby-dev:37691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-03* range.c (rb_range_beg_len): rb_raise takes C values as arguments.yugui
[BUG] ranges turned into other value in a message of RangeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-25* range.c (range_inspect): fix SEGV for cyclic range object.mame
[ruby-core:18835] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20* range.c (range_initialize_copy): Range is now a Struct.nobu
[ruby-core:18353] * struct.c (rb_struct_init_copy): made public. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16* include/ruby/ruby.h (rb_intern_const): tiny optimization.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.nobu
* *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02* range.c (range_step): call to_int if step is not a numericmatz
value. [ruby-dev:34575] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02* range.c (range_step): do not forcefully convert steps intomatz
integers. [ruby-dev:34571] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02* range.c (range_step): step may be bignum.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-01* range.c (range_step): check if step can be converted to an integer.nobu
[ruby-dev:34558] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-01* range.c (range_step): allow float step bigger than zero but lessnobu
than one. [ruby-dev:34557] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-28* range.c (range_each): use INT2FIX() for fixnum values.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07* range.c (range_each_func): should not leave a variablenobu
uninitialized, which could cause SEGV. * range.c (range_step): removed duplicated and unreachable code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-06* bignum.c (rb_cmpint): moved from compar.c, to check bignummatz
zero. * range.c (range_step): add step for each iteration if begin and end are numeric. [ruby-core:15990] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-03* range.c (range_include): add RDoc to describe that comparisonmatz
for numeric is done according magnitude of values. [ruby-core:15907] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05* numeric.c (fix_to_s): avoid rb_scan_args() when no argumentmatz
given. * bignum.c (rb_big_to_s): ditto. * enum.c (enum_first): ditto. * eval_jump.c (rb_f_catch): ditto. * io.c (rb_obj_display): ditto. * class.c (rb_obj_singleton_methods): ditto. * object.c (rb_class_initialize): ditto. * random.c (rb_f_srand): ditto. * range.c (range_step): ditto. * re.c (rb_reg_s_last_match): ditto. * string.c (rb_str_to_i): ditto. * string.c (rb_str_each_line): ditto. * string.c (rb_str_chomp_bang): ditto. * string.c (rb_str_sum): ditto. * string.c (str_modifiable): declare inline. * string.c (str_independent): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-15* range.c (rb_range_beg_len): check if responds to "begin" and "end"nobu
methods for non-Range object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-11* range.c (range_include): specialize single character stringmatz
case (e.g. (?a ..?z).include(?x)) for performance. [ruby-core:15481] * string.c (rb_str_upto): specialize single character case. * string.c (rb_str_hash): omit coderange scan for performance. * object.c (rb_check_to_integer): check Fixnum first. * object.c (rb_to_integer): ditto. * string.c (rb_str_equal): inline memcmp to avoid unnecessary rb_str_comparable(). * parse.y (rb_intern2): use US-ASCII encoding. * parse.y (rb_intern_str): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-29* range.c: fix SEGV by ("a" .. "z").step(2 ** 30) { }.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05* range.c (step_i, range_step): support non-fixnum steps.nobu
[ruby-talk:282100] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01* insns.def (concatarray, splatarray): use to_a instead ofmatz
to_splat. * insnhelper.ci (caller_setup_args): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23* struct.c (rb_struct_alloc_noinit): new function.akr
(rb_struct_define_without_accessor): add allocator to the arguments. * range.c (range_alloc): re-introduced using rb_struct_alloc_noinit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-23* struct.c (rb_struct_define_without_accessor): new function.akr
* range.c (range_alloc): removed. (Init_Range): use rb_struct_define_without_accessor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-19* range.c (range_last): commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-18* range.c (Init_Range): typo fixed.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-18* range.c (range_first): takes first n element if argument ismatz
given. [ruby-core:12697] * range.c (range_last): returns last n elements if argument is given. * array.c (rb_ary_subseq, rb_ary_last): export. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-10* range.c (range_dumper): make uninitialized range dumpable.akr
(range_loader): make uninitialized range loadable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-10* range.c: represent initialized state using EXCL instead of FL_USER3.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-09* range.c (range_step): fixed integer overflow. [ruby-dev:31763]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-08* eval_method.ci (rb_get_alloc_func): new function to get allocationakr
function. * include/ruby/intern.h (rb_alloc_func_t): declared. (rb_define_alloc_func): declared. (rb_marshal_define_compat): declared. * range.c: use T_STRUCT for Range. * inits.c: move Init_marshal() prior to Init_Range() because Init_Range calls rb_marshal_define_compat which needs marshal's compat_allocator_tbl initialized. * marshal.c: support marshal format compatibility layer designed for marshaling T_STRUCT Range using T_OBJECT format. (rb_marshal_define_compat): defined. [ruby-dev:31710] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e