summaryrefslogtreecommitdiff
path: root/range.c
AgeCommit message (Collapse)Author
2011-07-10 * range.c (range_max): fix behavior with excluded end value.tarui
[Bug #4591] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* eval.c, hash.c, load.c, proc.c, range.c, thread.c, time.c: don'takr
declare internal functions. * internal.h, vm_core.h: declare internal functions. * array.c: include internal.h. * common.mk: update dependency for array.o. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* internal.h: declare more internal functions.akr
* iseq.h (rb_method_get_iseq): declared. * compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c, ruby.c, time.c, util.c, vm.c: don't declare internal functions. * eval.c, parse.y, thread_pthread.c: non-existing function declarations removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17* internal.h: declare internal functions here.akr
* node.h: declare NODE dependent internal functions here. * iseq.h: declare rb_iseq_t dependent internal functions here. * vm_core.h: declare rb_thread_t dependent internal functions here. * bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y, proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c, thread.c, time.c, transcode.c, variable.c, vm.c, tool/compile_prelude.rb: don't declare internal functions declared in above headers. include above headers if required. Note that rb_thread_mark() was declared as void rb_thread_mark(rb_thread_t *th) in cont.c but defined as void rb_thread_mark(void *ptr) in vm.c. Now it is declared as the later in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* array.c: Documentation: change => in call-seq to ->.marcandre
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
2010-05-13* array.c: Harmonize documentation, in particular regarding:marcandre
- 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
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