summaryrefslogtreecommitdiff
path: root/ruby.c
AgeCommit message (Collapse)Author
2008-07-10merge revision(s) 17849:shyouhei
* ruby.c: Mac OS X needs origargc times of '\0' in origargv. [ruby-dev:35308] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29merge revision(s) 17586,17612:shyouhei
* ruby.c (set_arg0, ruby_prog_init): freeze $0. a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>. * test/inlinetest.rb (InlineTest.in_progname): workaround for frozen $0. [ruby-dev:35261] * lib/test/unit/ui/console/testrunner.rb (TestRunner#finished): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-06Merge changes from ruby_1_8 to reduce warnings and potentially improveknu
security. * mkconfig.rb: hide build path from rbconfig.rb. * util.c (ruby_strtod, dtoa): initialize more variables for error handling. * io.c (rscheck), marshal.c (w_nbyte, w_bytes, w_unique), (path2class, path2module): constified. * pack.c (pack_unpack), process.c (rb_syswait): suppress warnings. * suppress warnings on cygwin, mingw and mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-29Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-12* ruby.c (proc_options): -W should be allowed in RUBYOPTmatz
environment variable. [ruby-core:12118] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-26* dln.c (load_1, dln_find_1): constified.nobu
* ruby.c (usage): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-26* dln.c (conv_to_posix_path): removed.nobu
* ruby.c (rubylib_mangled_path, rubylib_mangled_path2): return VALUE instead of a pointer to static buffer. * ruby.c (push_include_cygwin): fixed buffer overflow. [ruby-dev:31297] * ruby.c (ruby_init_loadpath): not convert built-in paths. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-16* ruby.c (set_arg0): fill argv other than the first with an emptynobu
string instead of NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-01* configure.in, hash.c (ruby_setenv): use setenv(3) and unsetenv(3)ocean
where they are supported. modifing environ variable seems to segfault solaris 10. [ruby-core:7276] [ruby-dev:28270] * ruby.c (set_arg0): if use setenv(3), environ space cannot be used for altering argv[0]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-12* ext/digest/digest.c (rb_digest_base_s_digest): add volatile tomatz
protect temporary context object. [ruby-dev:27979] * ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should be called before actual variable initialization. [ruby-dev:27986] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-28* dir.c, eval.c, hash.c, process.c, ruby.c: avoid warning "unusedocean
variable" [ruby-dev:26387] (patch from Kazuhiro NISHIYAMA) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-24* numeric.c (fix_pow): support Fixnum ** Float case directlymatz
without coercing. [ruby-talk:142697] [ruby-talk:143054] * ruby.c (require_libraries): caused SEGV when continuation jumped in to the required library code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-01* ruby.c (set_arg0): use also environment variable space for settingnobu
$0. [ruby-core:04774] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-01* ruby.c (process_sflag): replace '-' in variable names with '_'.nobu
[ruby-dev:26107] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-28* exception error messages updated. [ruby-core:04497]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-25* ruby.c (proc_options): correct -T option in RUBYOPT. (backportedusa
from CVS HEAD) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-15* ruby.c (proc_options): ignore trailing CRs at the end of shortnobu
options as well as long options. fixed: [ruby-core:04232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-23* gc.c (define_final): should not disclose NODE* to Ruby world.matz
[ruby-dev:23957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-11* ruby.c (require_libraries): restore source file/line afternobu
statically linked extensions initialized. [ruby-dev:23357] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-04* eval.c (Init_load): make $LOADED_FEATURES built-in. [ruby-dev:23299]aamine
* ruby.c (ruby_prog_init): make $PROGRAM_NAME built-in. * lib/English.rb: remove $LOADED_FEATURES and $PROGRAM_NAME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-18* ruby.c: use translate_char() on Cygwin.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-06* ext/stringio/stringio.c (strio_set_string, strio_reopen): checknobu
tainted. * ext/stringio/stringio.c (strio_copy, strio_ungetc, strio_write, strio_putc): add infection. * ext/stringio/stringio.c (strio_path): just nil. [ruby-dev:21846] * ruby.c (proc_options): reserve searched script path in the source file name table. [ruby-list:38765] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30* ruby.c (proc_options): -F set compiled regular expression to $;.matz
[ruby-talk:77381] * string.c (Init_String): no setter type check for $; git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30* ruby.c: typo fix.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29* marshal.c (w_object): if object responds to 'marshal_dump',matz
Marshal.dump uses it to dump object. unlike '_dump', marshal_dump returns any kind of object. * marshal.c (r_object0): restore instance by calling 'marshal_load' method. unlike '_load', it's an instance method, to handle cyclic reference. * marshal.c (marshal_load): all objects read from file should be tainted. [ruby-core:01325] * lib/timeout.rb (Timeout::timeout): execute immediately if sec is zero. * ext/socket/socket.c (socks_init): typo fixed. [ruby-talk:77232] * ext/socket/extconf.rb: the default value for --enable-socks is taken from ENV["SOCKS_SERVER"]. [ruby-talk:77232] * ruby.c (proc_options): add -W option. -W0 to shut up all warning messages. [ruby-talk:77227] * error.c (rb_warn): no message will be printed if the value of $VERBOSE is "nil", i.e. perfect silence. * ruby.c (verbose_setter): $VERBOSE value is either true, false, or nil. * io.c (Init_IO): no "read" check for $stdin. in addition some function names has been changed. * regex.c (re_match_exec): incorrect multibyte match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4220 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* defines.h (PATH_ENV): name of PATH environment. [new].usa
* defines.h (ENV_IGNORECASE): define for case insensitive platforms to access environment variables. * dln.c (dln_find_exe): use PATH_ENV instead of "PATH". * hash.c (env_delete, rb_f_getenv, env_fetch, rb_env_path_tainted, env_aset): ditto. * ruby.c (proc_options): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-22* ruby.c: don't call VirtualQuery in ruby_init_loadpath()uema2
on mswince. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-25* eval.c (rb_yield_0): call avalue_to_mrhs() to assign blockmatz
parameter |a|. [ruby-dev:19897] * ruby.c (ruby_set_argv): freeze argument strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-13* ruby.c (proc_options): script argument is in effect only when -e is not given.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-13* ruby.c (ruby_init_loadpath): ensures buffer terminatednobu
before use strncpy(). * ruby.c (proc_options): avoid SEGV at -S with no arguments. (ruby-bugs-ja:PR#391) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-16-Wall cleanups (removed unused vars, no 'code has no effect' warnings)michal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3346 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-05* ruby.c (ruby_init_loadpath): under Windows, get the modulenobu
path from an internal address instead of hard coded library name. * cygwin/GNUmakefile.in, bcc32/Makefile.sub, win32/Makefile.sub (CPPFLAGS): removed LIBRUBY_SO macro. * bcc32/Makefile.sub, win32/Makefile.sub (config.h): no longer depends on makefiles. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-15* configure.in, defines.h, dir.c, dir.h, dln.c, error.c,uema2
eval.c, file.c, hash.c, io.c, main.c, missing.c, process.c, ruby.c, rubysig.h, signal.c, st.c, util.c, util.h, bcc/Makefile.sub, win32/Makefile.sub, win32/win32.h, ext/Win32API/Win32API.c, ext/socket/getaddrinfo.c, ext/socket/getnameinfo.c, ext/socket/socket.c, ext/tcltklib/stubs.c : replace "NT" with "_WIN32", add DOSISH_DRIVE_LETTER * wince/exe.mak : delete \r at the end of lines. * wince/mswince-ruby17.def : delete rb_obj_become git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-29* eval.c, file.c, gc.c, io.c, object.c, ruby.c, ruby.h, struct.c,knu
ext/socket/socket.c: differentiate long and int; use proper printf type specifiers and do casts where appropriate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-03* bcc32/mkexports.rb: to work on cygwin via telnet.nobu
[ruby-win32:358] * ext/tcltklib/tcltklib.c (ip_invoke): requires command name argument. [ruby-dev:18438] * eval.c (ruby_init, ruby_options): Init_stack() with local location. (ruby-bugs-ja:PR#277) * eval.c (rb_call0): disable trace call. [ruby-dev:18074] * eval.c (eval, rb_load): enable trace call. [ruby-dev:18074] * eval.c (rb_f_require): set source file name for extension libraries. [ruby-dev:18445] * ruby.c (translate_char): translate a character in a string; DOSISH only. [ruby-dev:18274] * ruby.c (ruby_init_loadpath): added argv[0] handling under Human68K. [ruby-dev:18274] * ruby.c (proc_options): translate directory separator in $0 to '/'. [ruby-dev:18274] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-22* eval.c (call_trace_func): should not call trace function whilenobu
compilation. * eval.c (rb_call0): also inside c-func. * parse.y (yycompile): ditto. * ruby.c (require_libraries): preserve source file/line for each require. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-02* gc.c (gc_sweep): does reclaim nodes in also compile time, if we can.aamine
* ruby.c (load_file): omit GC if we can. * parse.y (ruby_parser_stack_on_heap): new function. * intern.h (ruby_parser_stack_on_heap): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-27* ruby.c (require_libraries): prevent ruby_sorcefile from GC.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21*.c: Int vs Long cleanupmichal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-12* ruby.c (set_arg0): Correct the position of #endif.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-29* parse.y: yyparse #defines moved from intern.hmatz
* ruby.c (proc_options): access prefixed "ruby_yydebug". * applied modifies to pacify some of gcc -Wall warnings. * parse.y (arg): no more ugly hack for "**", so that "-2**2" to be parsed as "(-2)**2", whereas "- 2**2" or "-(2)**2" to be parsed as "-(2**2)". * parse.y (yylex): '-2' to be literal fixnum. [new] * time.c (time_succ): new method for Range support. * time.c (time_arg): nil test against v[6] (usec). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-23* ruby.c (proc_options): option parsing problem.nobu
(ruby-bugs-ja:PR#233) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-23* ruby.c (proc_options): removed "-*-" support for #! line.matz
* io.c (rb_io_s_sysopen): new method to get a raw file descriptor. [new] * ext/socket/socket.c (tcp_sysaccept): new method to return an accepted socket fd (integer). [new] * ext/socket/socket.c (unix_sysaccept,sock_sysaccept): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-22* ruby.c (proc_options): -T consumes digits only.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-14* eval.c (rb_clear_cache_by_class): new function.matz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-07* gc.c (rb_source_filename): added. holds unique strings for filenobu
names with GC space. * gc.c (rb_gc_mark): mark source file name. * gc.c (gc_sweep): ditto. * gc.c (Init_GC): initialize source file name table. * intern.h (rb_source_filename): added. * eval.c (rb_eval_string): use rb_source_filename(). * parse.y (yycompile): ditto. * ruby.c (proc_options): ditto. * ruby.c (load_file): ditto. * ruby.c (ruby_script): ditto. * ruby.c (ruby_prog_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-10* ruby.c (load_file): avoid SEGV on '#' only input.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e