summaryrefslogtreecommitdiffstats
path: root/numeric.c
Commit message (Collapse)AuthorAgeFilesLines
* * variable.c (rb_const_get_0): should check constants defined inmatz2003-08-281-2/+2
| | | | | | | | | | | included modules, if klass is Object. [ruby-talk:79302] * numeric.c (check_uint): check should be done using UINT_MAX, not INT_MAX. this fix is submitted by <lyle@knology.net> in [ruby-core:01486] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (method_proc): should specify YIELD_FUNC_SVALUE.matz2003-08-041-1/+1
| | | | | | | | | | [ruby-dev:21107] * marshal.c (w_object): should not call w_extended for USRMARSHAL dump. [ruby-dev:21106] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (flo_to_s): get rid of buffer overflow.matz2003-08-021-1/+1
| | | | | | | | * io.c (appendline): clearerr(3) before raising exception, since exception may be captured by rescue. [ruby-talk:77794] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_num_coerce_relop): export function.matz2003-07-311-10/+10
| | | | | | | | * marshal.c (w_object): check has been dropped. "_dump must return string." [ruby-dev:21024] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz2003-07-251-3/+4
| | | | | | | | | uninitialized size_t value. [ruby-talk:76946] * Minor cleanups. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (num_equal): should not use rb_equal().matz2003-07-211-2/+4
| | | | | | | * object.c (rb_equal): back out the last change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_fix2uint): renamed from rb_fix2int on IA64.eban2003-06-161-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_num2uint, rb_fix2int): new function to convertnobu2003-05-301-6/+49
| | | | | | | | | values over INT_MAX. [ruby-core:01099] * ruby.h (NUM2UINT, FIX2INT): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (init_copy): rename copy_object as initialize_copy,matz2003-05-191-2/+2
| | | | | | | | | | since it works as copy constructor. * eval.c (rb_add_method): initialize_copy should always be private, like initialize. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc): check odd alignment stack on m68k machines.matz2003-05-081-1/+4
| | | | | | | * numeric.c (num_step): better error treatment of float values. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compar.c (rb_cmperr): raise comparison failure.nobu2003-05-081-34/+28
| | | | | | | | | | | * intern.h: prototype; rb_cmperr * numeric.c (flo_gt, flo_ge, flo_lt, flo_le, fix_gt, fix_ge, fix_lt, fix_le): should fail unless the argument is comparable. (ruby-bugs-ja:PR#456) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (int_upto, int_downto): should fail unless thenobu2003-05-071-4/+24
| | | | | | | argument is comparable. (ruby-bugs-ja:PR#454) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (num_step): remove epsilon; add margin of 0.5, to makematz2003-05-061-2/+1
| | | | | | | "1.1.step(1.5,0.1)" to work (third try). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_obj_methods): list singleton methods if recurmatz2003-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | argument is false; list all methods otherwise. * numeric.c (num_step): double epsilon to make "1.1.step(1.5,0.1)" to work. * ext/gdbm/gdbm.c (fgdbm_values_at): new method to replace select(index..). * ext/sdbm/init.c (fsdbm_values_at): ditto. * ext/dbm/dbm.c (fdbm_values_at): ditto. * ext/dbm/dbm.c (DBM::VERSION): defined. * ext/gdbm/testgdbm.rb: replace select with values_at. * ext/sdbm/testsdbm.rb: ditto. * ext/dbm/testdbm.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_values_at): new method to replace select(index..).matz2003-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | * hash.c (rb_hash_values_at,env_values_at): ditto. * re.c (match_values_at): ditto. * struct.c (rb_struct_values_at): ditto. * re.c (match_select): add iterator behavior. * ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c, ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up "_FILE_OFFSET_BITS redefined" warning on Solaris. * class.c (rb_class_protected_instance_methods): now gives warnings to show migration path. The default will be reversed on Jan 2004. * numeric.c (num_step): "1.1.step(1.5,0.1)" to work. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (flo_is_finite_p): use finite() if available.nobu2003-04-211-1/+6
| | | | | | | | | | | * win32/win32.h (isinf, isnan): define as macro. [ruby-win32:00533] * bcc32/Makefile.sub, win32/Makefile.sub: no longer use missing/isinf.c, missing/isnan.c. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_fix2str): buffer was insufficient.nobu2003-04-151-1/+1
| | | | | | | (ruby-bugs-ja:PR#431) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h (struct OpenFile): add error raise flag to finalizer.matz2003-04-141-2/+2
| | | | | | | | | | | | | | | | * io.c (Init_IO): define $/, $-0, and $\ as string-only variables. * string.c (rb_str_split_m): does not generate empty string if there's no match in the receiver. * io.c (fptr_finalize): should raise error on EBADF for readable IOs as well. * file.c (rb_stat): use rb_check_convert_type() to retrieve IO. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_cstr_to_inum, rb_big2str): allow 2-36 as radix.nobu2003-04-141-9/+18
| | | | | | | | | * numeric.c (rb_fix2str): ditto. * string.c (rb_str_to_i): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (coerce_rescue): prevent inspected String from GC.nobu2003-04-111-20/+36
| | | | | | | | * numeric.c (flo_eq, rb_dbl_cmp, flo_gt, flo_ge, flo_lt, flo_le, flo_eql): correct NaN comparison. (ruby-bugs:PR#744) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_missing): use "inspect" for T_OBJECT as well.matz2003-04-031-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (flo_to_s): change format specifier to "%.15g" tomatz2003-03-201-1/+1
| | | | | | | avoid unnecessary 9s (e.g. 99.59999999999999). (ruby-bugs-ja PR#406) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_aref): give warning if index is a symbol.matz2003-03-041-0/+3
| | | | | | | | | [ruby-list:37217] * array.c (rb_ary_aset): raise TypeError if index is a symbol. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (str_new): need no MEMZERO().matz2003-02-271-8/+8
| | | | | | | | | | | | * numeric.c (fix_gt): use rb_num_coerce_cmp() instead of rb_num_coerce_bin. * numeric.c (fix_ge, fix_lt, fix_le): ditto. * numeric.c (flo_gt, flo_ge, flo_lt, flo_le): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (Init_Object): default Object#=== now calls "=="matz2003-02-031-1/+0
| | | | | | | | | | | | | | | | | | internally. * re.c (rb_reg_initialize_m): should honor option status of original regexp. * array.c (rb_ary_equal): ary2 should be T_ARRAY (no to_ary conversion). * array.c (rb_ary_eql): ditto. * string.c (rb_str_equal): str2 should be T_STRING (no to_str conversion). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_obj_classname): new function.matz2003-01-311-5/+5
| | | | | | | | | | | | * string.c (rb_str_dup): should preserve original's class (but not hidden singleton class). * string.c (rb_str_substr): ditto. * parse.y: backout EXPR_CMDARG removal. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rational.rb: modified to support "quo".matz2003-01-231-16/+23
| | | | | | | | | | * numeric.c (num_quo): should return most exact quotient value, i.e. float by default, rational if available. * numeric.c (num_div): "div" should return x.divmod(x)[0]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Updated Copyrights of Matz to 2003.michal2003-01-161-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_each): treat fixnums specially to boost.matz2003-01-081-3/+13
| | | | | | | * numeric.c (num_step): remove rb_scan_args() for small speedup. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (DBL_MAX_10_EXP): fix typo. [ruby-dev:36826]usa2002-12-241-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 021224matz2002-12-241-2/+44
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (do_block): split "do" block and tLBRACE_ARG block.matz2002-12-201-2/+2
| | | | | | | | | | | | | | | | | * parse.y (cmd_brace_block): new tLBRACE_ARG block rule * parse.y (command): can take optional cmd_brace_block; use %prec to resolve shift/reduce conflict. (ruby-bugs-ja PR#372) * eval.c (ruby_finalize): trace_func should be cleared here (after executing exit procs and finalizers). * eval.c (rb_define_alloc_func): new allocation framework, based on Nobu's work [ruby-dev:19116]. "allocate" method is no longer used for object allocation. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (DBL_EPSILON): fix typo.usa2002-12-191-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (num_step): use DBL_EPSILON.matz2002-12-191-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * array.c (rb_check_array_type): new function: return an array (convert if possible), or nil. * string.c (rb_check_string_type): new function: return a string (convert if possible), or nil. * numeric.c (rb_dbl_cmp): returns nil if values are not comparable. * numeric.c (fix_cmp,flo_cmp): use rb_num_coerce_cmp() * bignum.c (rb_big_cmp): ditto. * numeric.c (rb_num_coerce_cmp): new coercing function for "<=>", which does not raise TypeError. * numeric.c (do_coerce): can be supress exception now. * object.c (rb_mod_cmp): should return nil for non class/module objects. * re.c (rb_reg_eqq): return false if the argument is not a string. now returns boolean value. * class.c (rb_include_module): argument should be T_MODULE, not T_class, nor T_ICLASS. * eval.c (is_defined): "defined?" should return "assignment" for attribute assignment (e.g. a.foo=b) and indexed assignment (e.g. a[2] = 44). * parse.y (aryset): use NODE_ATTRASGN. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sprintf.c (rb_f_sprintf): preceding ".." for negative numbersmatz2002-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | still left; removed. * sprintf.c (rb_f_sprintf): should not prepend '0' if width > prec for example "%5.3d". * process.c (Init_process): add Process.exit and Process.abort * pack.c (utf8_to_uv): raise ArgumentError for malformed/redundant UTF-8 sequences. * process.c (last_status_set): add pid attribute to Process::Status. * pack.c (uv_to_utf8): limit maximum length of the encoded string to 6 bytes, even when the platform supports 8 bytes long integers. * pack.c (utf8_to_uv): do not decode sequences longer than 6 bytes. * object.c (copy_object): use "copy_object" method, not "become". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_find_file_ext): should not terminate searching withmatz2002-11-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | empty path, just ignore. * dir.c: remove <sys/parm.h> inclusion. * compar.c (cmp_eq,cmp_gt,cmp_ge,cmp_lt,cmp_le): check using rb_cmpint(). * error.c (init_syserr): remove sys_nerr dependency. * numeric.c (num_cmp): added to satisfy Comparable assumption. * eval.c (rb_add_method): "initialize" should be public if it is a singleton method. * regex.c (re_match): avoid dereferencing if size == 0. (ruby-bugs-ja:PR#360) * time.c (time_cmp): should return nil if an operand is not a number nor time. (ruby-bugs-ja:PR#359) * file.c (rb_stat_cmp): should return nil if an operand is not File::Stat. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (Init_Object): added Object#object_id, new name formatz2002-11-031-0/+13
| | | | | | | | | | | | | | | | | | | Object#id. [new] * object.c (rb_obj_id_obsolete): give warning for Object#id. * numeric.c (fix_intern): added Fixnum#to_sym. [new] * object.c (sym_to_sym): rename from Symbol#intern * enum.c (enum_zip): added Enumerable#zip. [new] * array.c (rb_ary_zip): added Array#zip. * error.c (init_syserr): remove sys_nerr dependency. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Int vs Long cleanup #3 (ruby-core:352)michal2002-08-281-8/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_find_file): $LOAD_PATH must not be empty.matz2002-08-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * file.c (rb_find_file_ext): ditto. * range.c (range_eq): class check should be based on range.class, instead of Range to work with Range.dup. * range.c (range_eql): ditto. * class.c (rb_mod_dup): need to preserve metaclass and flags. * object.c (rb_cstr_to_dbl): had a buffer overrun. * marshal.c (w_class): integrate singleton check into a funciton to follow DRY principle. * marshal.c (w_uclass): should check singleton method. * object.c (rb_obj_dup): dmark and dfree functions must be match for T_DATA type. * object.c (rb_obj_dup): class of the duped object must be match to the class of the original. * re.c (rb_reg_quote): do not escape \t, \f, \r, \n, for they are not regular expression metacharacters. * time.c (time_s_alloc): use time_free instead of free (null check, also serves for type mark). * time.c (time_s_at): check dfree function too. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *.c: Int vs Long cleanupmichal2002-08-211-19/+19
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (sort_2): *a - *b may overflow.matz2002-08-191-4/+11
| | | | | | | | | | | | | | | | * array.c (ary_new): len*sizeof(VALUE) may be a positive value. * array.c (rb_ary_initialize): ditto. * object.c (rb_class_allocate_instance): move singleton class check from rb_obj_alloc(). * re.c (rb_reg_initialize): should not modify frozen Regexp. * ext/tcltklib/tcltklib.c (ip_init): allocation framework. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (rb_hash_replace): should copy ifnone.matz2002-08-131-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hash.c (rb_hash_dup): should preserve HASH_PROC_DEFAULT and HASH_DELETED flags. * hash.c (rb_hash_shift): shift from empty hash should not return its default proc. * hash.c (rb_hash_default_proc): new method. [new] * array.c (rb_ary_aref): no need for Bignum check. * array.c (rb_ary_aset): explicit Bignum check removd. * numeric.c (fix_aref): normalize bignum before bit-op. * bignum.c (rb_big_rand): max may be Bignum zero. * bignum.c (rb_cstr_to_inum): should normalize bignums, to avoid returning fixable bignum value. * bignum.c (rb_uint2big): there should be no zero sized bignum. * ext/extmk.rb.in: extmake() that works properly for both tkutil (tk/tkutil.so) and digest/sha1. * hash.c (rb_hash_equal): should check HASH_PROC_DEFAULT too. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (num_to_int): default to_int implementaion for everymatz2002-07-291-12/+11
| | | | | | | | | | numeric class. * re.c (rb_reg_quote): initial part of the string was never copied to the quoted string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c: replace with Mersenne Twister RNG.matz2002-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c (jump_tag_but_local_jump): preserve retval in LocalJumpError exceptions. * parse.y (command): no more check for "super outside of method". * eval.c (rb_mod_define_method): should set last_class and last_func in the block->frame. * eval.c (error_handle): should handle TAG_THROW as well. * parse.y (yylex): new decimal notation '0d4567'. * parse.y (yylex): new octal notation '0o777'. * parse.y (string_content): every string_content node should return string only. use NODE_EVSTR to coercing. * eval.c (rb_eval): NODE_EVSTR support. * re.c (rb_reg_quote): avoid unnecessary string allocation. * string.c (get_pat): quote metachracters before compiling a string into a regex. * string.c (rb_str_split_m): special treatment of strings of size 1, but AWK emulation. now uses get_pat(). * string.c (rb_str_match_m): quote metacharacters. * string.c (rb_str_match2): ditto. * ext/socket/socket.c (sock_addrinfo): make all 3 versions of getaddrinfo happy. [ruby-core:00184] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (fix_lshift): negative shift count means right shift.nobu2002-06-101-2/+7
| | | | | | | | | | * numeric.c (fix_rshift): return -1 when left side operand is negative. * parse.y (yylex): `0_' should be an error. (ruby-bugs-ja:PR#239) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_aset): should raise error if an indexing stringmatz2002-06-041-4/+7
| | | | | | | | | | | | is not found in the receiver. * sprintf.c (rb_f_sprintf): "%d" should convert objects into integers using Integer(). * lib/tempfile.rb (Tempfile::size): added. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: fixed format string for 'long' args (%d -> %ld).michal2002-05-281-4/+4
| | | | | | | | | | | | | | | | | | | | | * class.c: ditto. * eval.c: ditto. * numeric.c: ditto. * pack.c: ditto. * parse.y: ditto. * range.c: ditto. * string.c: ditto. * util.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_clear_cache_by_class): new function.matz2002-05-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | * eval.c (set_method_visibility): should have clear cache forq updated visibility. * numeric.c (flo_to_s): default format precision to be "%.16g". * util.c (ruby_strtod): use own strtod(3) implementation to avoid locale hell. Due to this change "0xff".to_f no longer returns 255.0 * eval.c (avalue_to_yvalue): new function to distinguish yvalue (no-arg == Qundef) from svalue (no-arg == Qnil). * eval.c (rb_yield_0): use avalue_to_yvalue(). * eval.c (assign): warn if val == Qundef where it means rhs is void (e.g. yield without value or call without argument). * parse.y (value_expr): need not to warn for WHILE and UNTIL, since they can have return value (via valued break). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c: use HAVE_DECL_SYS_NERR instead of platform names.matz2002-05-021-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (num_step): better iteration condition for floatmatz2002-05-011-11/+7
| | | | | | | | | | | | | | | | | | | | values; suggested by Masahiro TANAKA <masa@ir.isas.ac.jp>. * range.c (range_step): step (for Range#step method) <= 0 makes no sence, thus ArgError will be raised. * range.c (range_each): Range#each method is special case for Range#step(1) * file.c (rb_find_file): load must be done from an abolute path if $SAFE >= 4. * enum.c (enum_partition): new method. [new] * re.c (rb_reg_s_quote): quote whitespaces for /x cases. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e