summaryrefslogtreecommitdiff
path: root/file.c
AgeCommit message (Collapse)Author
2003-12-24* stable version 1.8.1 released.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-21Add file.c comments (and necessary support in parse_c.rb)dave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-15* file.c: renamed and externalized rb_path_next,nobu
rb_path_skip_prefix, rb_path_last_separator, rb_path_end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-15* dir.c (check_dirname): check string safety and remove extraneousnobu
trailing directory separators. [ruby-dev:22279] * file.c: extern rb_path_next, rb_path_skip_prefix, rb_path_last_separator, rb_path_end. * intern.h: prototypes for rb_path_next, rb_path_skip_prefix, rb_path_last_separator, rb_path_end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11* configure.in (ieeefp.h), numeric.c: needed for finite() onnobu
Solaris. [ruby-core:01921] * file.c (rb_stat_inspect): adjust format specifier. * parse.c (arg_prepend): nodetype() is for debug use. * ruby.h (ISASCII, etc): cast to int to get rid of warning. * ruby.h (alloca.h): include even in GCC. [ruby-core:01925] * ext/bigdecimal/bigdecimal.c (GetVpValue): adjust format specifier. * ext/bigdecimal/bigdecimal.c (BigDecimal_prec, BigDecimal_coerce, BigDecimal_divmod): use rb_assoc_new() to suppress memory usage. * ext/bigdecimal/bigdecimal.c (BigDecimal_split): ditto. * ext/dl/sym.c (rb_dlsym_guardcall): guard itself should be volatile. * ext/iconv/iconv.c (iconv_convert): ensure actual parameter with format specifier. * ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): do not define unless used. * ext/pty/pty.c (getDevice): get rid of warning. * ext/socket/socket.c (port_str, sock_s_getaddrinfo, sock_s_getnameinfo): FIX2INT() now returns long. * ext/socket/socket.c (init_inetsock_internal): uninitialized variable. * ext/syck/rubyext.c (syck_parser_assign_io): add prototype. * ext/syck/rubyext.c (rb_syck_mktime, yaml_org_handler): use ISDIGIT() instead of isdigit() to avoid warnings and for platforms which don't support non-ascii charater. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-28* gc.c (gc_mark): explicitly check mark recursion levels, insteadmatz
of unreliable stack length. * file.c (path_check_1): honor sticky bits always. [ruby-talk:86273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22* gc.c (Init_stack): stack region is far smaller than usual ifmatz
pthread is used. * marshal.c (w_extended): singleton methods should not be checked when dumping via marshal_dump() or _dump(). [ruby-talk:85909] * file.c (getcwdofdrv): avoid using getcwd() directly, use my_getcwd() instead. * merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine <sunshine@sunshineco.com>. [ruby-core:01596] * marshal.c (w_object): LINK check earlier than anything else, i.e. do not dump TYPE_IVAR for already dumped objects. (ruby-bugs PR#1220) * eval.c (rb_eval): call "inherited" only when a new class is generated; not on reopening. * eval.c (eval): prepend error position in evaluating string to * configure.in: revived NextStep, OpenStep, and Rhapsody ports which had become unbuildable; enhanced --enable-fat-binary option so that it accepts a list of desired architectures (rather than assuming a fixed list), or defaults to a platform-appropriate list if user does not provide an explicit list; made the default list of architectures for MAB (fat binary) more comprehensive; now uses -fno-common even when building the interpreter (in addition to using it for extensions), thus allowing the interpreter to be embedded into a plugin module of an external project (in addition to allowing embedding directly into an application); added checks for <netinet/in_systm.h> (needed by `socket' extension) and getcwd(); now ensures that -I/usr/local/include is employed when extensions' extconf.rb scripts invoke have_header() since extension checks on NextStep and OpenStep will fail without it if the desired resource resides in the /usr/local tree; fixed formatting of --help message. * Makefile.in: $(LIBRUBY_A) rule now deletes the archive before invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives (see configure's --enable-fat-binary option); added rule for new missing/getcwd.c. * defines.h: fixed endian handling during MAB build (see configure's --enable-fat-binary option) to ensure that all portions of the project see the correct WORDS_BIGENDIAN value (some extension modules were getting the wrong endian setting); added missing constants GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H define in NeXT section. * dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on NextStep since, on some installations, this value always resolves uselessly to zero. * dln.c: added error reporting to NextStep extension loader since the previous behavior of failing silently was not useful; now ensures that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined for OpenStep and Rhapsody; no longer includes <mach-o/dyld.h> twice on Rhapsody since this header lacks multiple-include protection, which resulted in "redefinition" compilation errors. * main.c: also create hard reference to objc_msgSend() on NeXT platforms (in addition to Apple platforms). * lib/mkmf.rb: now exports XCFLAGS from configure script to extension makefiles so that extensions can be built MAB (see configure's --enable-fat-binary option); also utilize XCFLAGS in cc_command() (but not cpp_command() because MAB flags are incompatible with direct invocation of `cpp'). * ext/curses/extconf.rb: now additionally checks for presence of these curses functions which are not present on NextStep or Openstep: bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(), setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(), wscrl(), wsetscrreg() * ext/curses/curses.c: added appropriate #ifdef's for additional set of curses functions now checked by extconf.rb; fixed curses_bkgd() and window_bkgd() to correctly return boolean result rather than numeric result; fixed window_getbkgd() to correctly signal an error by returning nil rather than -1. * ext/etc/etc.c: setup_passwd() and setup_group() now check for null pointers before invoking rb_tainted_str_new2() upon fields extracted from `struct passwd' and `struct group' since null pointers in some fields are common on NextStep/OpenStep (especially so for the `pw_comment' field) and rb_tainted_str_new2() throws an exception when it receives a null pointer. * ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(). * ext/socket/getaddrinfo.c: cast first argument of getservbyname(), gethostbyaddr(), and gethostbyname() from (const char*) to non-const (char*) for older platforms such as NextStep and OpenStep. * ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(); include <netinet/in_systm.h> if present for NextStep and OpenStep; cast first argument of gethostbyaddr() and getservbyname() from (const char*) to non-const (char*) for older platforms. * ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for platforms such as NextStep and OpenStep which lack strdup(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-04* io.c (read_all): fptr->f may be NULL, if IO is closed in thematz
signal handler. * io.c (io_read): ditto. * string.c (get_pat): remove 1.8.0 warning code. * string.c (rb_str_match): extend warning until 1.8.2. * string.c (rb_str_match2): ditto. * class.c (class_instance_method_list): remove 1.8.0 warnings. method_list now recurs. [ruby-dev:21816] * class.c (rb_obj_singleton_methods): ditto. * array.c (rb_ary_select): remove select with block. [ruby-dev:21824] * hash.c (rb_hash_select): ditto. * hash.c (env_select): ditto. * re.c (match_select): ditto. * struct.c (rb_struct_select): ditto. * process.c (check_uid_switch): remove duplicated error messages. * process.c (check_gid_switch): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-24* hash.c (rb_hash_each): Hash#each should yield single value.matz
[ruby-talk:84420] * hash.c (env_each): ditto for ENV.each. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-21* eval.c (ruby_cleanup): call finalizers and exit procs beforematz
terminating threads. * eval.c (ruby_cleanup): preserve ruby_errinfo before ruby_finalize_0(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-23* file.c (rb_file_s_expand_path): avoid calling rb_scan_args() formatz
apparent cases. [ruby-talk:79748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-23BUFCHECK() doesn't update p/pend in loop.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-23* file.c (file_expand_path): performance improvement.nobu
[ruby-talk:79748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-15* configure.in (HUGE_ST_INO): check whether struct stat.st_inonobu
is larger than long. [ruby-dev:21194] http://www.geocities.co.jp/SiliconValley-PaloAlto/1409/ruby/beos.html * error.c (syserr_eqq): errno might exceed Fixnum limit. * error.c (Init_Exception): moved base initialization from init_syserr(). * inits.c (rb_call_inits): postpone initializing errnos until Bignum is available. * ext/curses/curses.c (_XOPEN_SOURCE_EXTENDED): needed to let keyname() and so on be declared. * ext/curses/curses.c (curses_resizeterm, window_resize): arguments conflicted with macros in term.h. * ext/curses/curses.c (Curses module methods): ensure initialized. [ruby-dev:21191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30* configure.in (os2-emx): renamed from os2_emx, add flags tonobu
CFLAGS and LDFLAGS, and remove lib prefix. [ruby-dev:20993] * file.c (rb_file_s_rename): retry with removing new file on DOSISH. [ruby-dev:21007] * ext/socket/extconf.rb (sendmsg, recvmsg): check functions. * ext/socket/socket.c (unix_send_io, unix_recv_io): raise NotImplementedError unless system calls are available. * ext/socket/socket.c (sock_initialize): rename from sock_init() to get rid of conflict with OS/2 socket library. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-28* file.c (Init_File): IO should include File::Const.nobu
[ruby-dev:20964] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25* ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz
uninitialized size_t value. [ruby-talk:76946] * Minor cleanups. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* gcc -Wall clean-up.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23* file.c (DOSISH): better Cygwin support.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23* string.c (rb_str_lstrip_bang): strip NUL along with whitematz
spaces. [ruby-talk:76659] * string.c (rb_str_rstrip_bang): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-20* string.c: use StringValueCStr to retrieve paths to system calls.matz
* string.c (rb_string_value_cstr): check null byte in the string before retrieving C ptr. accessed via macro StringValueCStr. * file.c (sys_fail2): raise error for two operand system calls such as rename, link, symlink. (ruby-bugs PR#1047) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-23* string.c (rb_str_upto): generate sequence according to "succ"matz
order. formerly check was done by dictionary order. [ruby-talk:74138] * string.c (rb_string_value): fill constant empty string along with setting ELTS_SHARED if str->ptr is NULL. [ruby-core:01179] * string.c (rb_string_value_ptr): ditto. * string.c (rb_check_string_type): ditto. * string.c (str_gsub): move END(0) check before mbclen2(). * string.c (scan_once): reduce END(0) check. * io.c (rb_io_initialize): accept fixnum mode. * eval.c (error_print): replace strchr() by memchr(), einfo may contain "\0". * pack.c (pack_unpack): range check for "@" move; initialize check for "m". * error.c (syserr_initialize): avoid buffer overflow. * file.c (rb_file_s_readlink): expand buffer until readlink succeed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-20* parse.y (new_yield): distinguish "yield 1,2" and "yield [1,2]".matz
[ruby-dev:20360] * eval.c (rb_eval): support new_yield() change. * variable.c (rb_const_get_0): warn for Foo::BAR when BAR is a toplevel constant (i.e. a constant defined under Object). [ruby-list:36935] * parse.y (no_blockarg): separate no block argument check and ret_args argument processing. * range.c (rb_range_beg_len): out_of_range check after adjusting end point. [ruby-dev:20370] * parse.y (call_args): the first argument to arg_cancat() should be NODE_LIST. [ruby-core:01151] * eval.c (rb_eval): should dispatch based on ID type. * eval.c (rb_yield_0): should restore scope_vmode during yield. [ruby-dev:20361] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-19* object.c (init_copy): rename copy_object as initialize_copy,matz
since it works as copy constructor. * eval.c (rb_add_method): initialize_copy should always be private, like initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-01* regex.c (re_match_exec): $ _always_ matches at the end of string.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-14* file.c (file_expand_path): root must follow buf whennobu
reallocated. [ruby-talk:69339], [ruby-dev:20025] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-14* rubyio.h (struct OpenFile): add error raise flag to finalizer.matz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11* file.c (rb_stat): dereference using StringValuePtr().matz
* file.c (rb_file_s_stat): use rb_stat(). [ruby-dev:20007] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-10* file.c (rb_find_file): need world writable directory check formatz
relative paths too. * file.c (rb_find_file): world writable directory check if $SAFE >= 1 (was $SAFE >= 2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-20* file.c (file_expand_path): fix wrong behavior for root file.nobu
expand_path("..", "//machine/share") => "//machine/share" expand_path("..", "c:/a") => "c:/" expand_path("..", "/a") => "/" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-20* file.c (file_expand_path): should not upward beyond share name.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-17*** empty log message ***nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-16* file.c (file_expand_path): buffer might be reallocated whilenobu
expanding default directory. * file.c (file_expand_path): default directory was being ignored if path was full path with no drive letter, under DOSISH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-14* file.c (file_expand_path): fix surplus path separators whilenobu
expanding at root directory. [ruby-dev:19572] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-13*** empty log message ***nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-13* range.c (range_step): step might be float 0 < x < 1.matz
* eval.c (rb_thread_schedule): pause if no runnable thread when there's only one thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-12* file.c (rb_file_s_dirname): append "." if drive only.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-12* file.c (strrdirsep): ignore trailing directory separators.nobu
* file.c (rb_file_s_expand_path): File.expand_path(".","/") should return "/". (ruby-bugs-ja:PR#389) * file.c (rb_file_s_basename): also ignore trailing directory separators, in compliance with SUSv3. (ruby-bugs-ja:PR#390) * file.c (rb_file_s_dirname, rb_file_s_extname): ditto. * file.c (rb_file_s_split): get rid of converting twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-31* variable.c (rb_obj_classname): new function.matz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-29* file.c (rb_file_s_expand_path): removed a sludge.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-19* file.c (eaccess): under windows, make eaccess() just callusa
access(). [ruby-core:716], [ruby-bugs:PR#556] * ChangeLog: fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-16Updated Copyrights of Matz to 2003.michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-06* file.c: improve DOSISH drive letter support.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-04* file.c (utimbuf): use utimbuf instead of _utimbuf if defined _WIN32.usa
* win32/Makefile.sub (LIBS): use oldnames.lib. * win32/win32.c (rb_w32_getcwd): follow above change. * win32/win32.h: ditto. * wince/direct.c, wince/direct.h (getcwd): ditto. * wince/io.h: ditto. * wince/string.c, wince/wince.h (stricmp, strnicmp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-03* file.c (rb_file_s_lchmod): get rid of gcc-3 -O3 warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-31* array.c (rb_ary_transpose): Properly declare ary as a VALUE.knu
* file.c (rb_file_s_chmod): Do not directly cast an int to void * to avoid a warning. * defines.h (FLUSH_REGISTER_WINDOWS): Add support for FreeBSD/sparc64. miniruby still coredumps in a different place, though. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-29* file.c (rb_file_s_chmod): get rid of gcc-3 -O3 warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-21* array.c (ary_alloc), dir.c (dir_s_alloc), eval.c (thgroup_s_alloc),usa
file.c (rb_stat_s_alloc), hash.c (hash_alloc), io.c (io_alloc), object.c (rb_module_s_alloc, rb_class_allocate_instance), re.c (match_alloc, rb_reg_s_alloc), string.c (str_alloc), time.c (time_s_alloc), ext/digest/digest.c (rb_digest_base_alloc), ext/tcltklib/tcltklib.c (ip_alloc), ext/win32ole/win32ole.c (fole_s_allocate, fev_s_allocate) : add prototype to get rid of VC++ warnings. * ext/sdbm/init.c (fsdbm_alloc): allocator takes only one argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20* parse.y (do_block): split "do" block and tLBRACE_ARG block.matz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19* numeric.c (num_step): use DBL_EPSILON.matz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e