summaryrefslogtreecommitdiff
path: root/ruby.c
AgeCommit message (Collapse)Author
2012-04-15* reduce UNREACHABLE.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14* variable.c (trace_ev): Removed "not reached" comment as this line isdrbrain
reached. * variable.c (rb_obj_remove_instance_variable): Replaced "not reached" comment with the UNREACHABLE macro. * variable.c (rb_mod_const_missing): ditto. * variable.c (rb_mod_remove_cvar): ditto. * enum.c (first_i): ditto. * string.c (rb_str_aref): ditto. * string.c (str_byte_aref): ditto. * string.c (rb_to_id): ditto. * io.c (rb_io_fmode_modestr): ditto. * io.c (rb_io_oflags_modestr): ditto. * pack.c (num2i32): ditto. * vm_eval.c (rb_method_missing): ditto. * vm_eval.c (rb_f_throw): ditto. * dir.c (dir_read): ditto. * win32/win32.c (child_result): ditto. * struct.c (rb_struct_getmember): ditto. * struct.c (rb_struct_set): ditto. * struct.c (rb_struct_aref_id): ditto. * eval.c (rb_f_raise): ditto. * process.c (rb_f_exit_bang): ditto. * process.c (rb_f_exit): ditto. * process.c (rb_f_abort): ditto. * ext/-test-/iter/break.c (iter_break_value): ditto. * ext/pty/pty.c (pty_check): ditto. * ext/openssl/ossl_pkey.c (ossl_pkey_new): ditto. * ext/readline/readline.c (rb_remove_history): ditto. * ext/stringio/stringio.c (strio_unimpl): ditto. * numeric.c (num_sadded): ditto. * numeric.c (num_init_copy): ditto. * numeric.c (rb_num2ll): ditto. * numeric.c (rb_num2ull): ditto. * vm_insnhelper.c (call_cfunc): ditto. * ruby.c (opt_W_getter): ditto. * bignum.c (rb_big_coerce): ditto. * file.c (rb_f_test): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26* win32/win32.c (check_if_dir, check_if_wdir): fix for Visual C++nobu
not to use S_ISDIR(). [Feature #2408][ruby-core:26925] * ruby.c (load_file_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26* ruby.c (load_file_internal): bail out if the script is a directory.nobu
[Feature #2408][ruby-core:26925] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-07* error.c (rb_load_fail): should honor encoding.nobu
* load.c (load_failed): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-07rb_load_failnobu
* error.c (rb_load_fail): use path as a string, not char*. * internal.h: (rb_load_fail): moved from ruby/intern.h. * ruby.c (load_file_internal): fname cannot be NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06* error.c (rb_loaderror_with_path): Adding the missing file as antenderlove
instance variable to the LoadError exception. * load.c: call rb_loaderror_with_path so that the missing path is added to the exception. * ruby.c: call rb_loaderror rather than raising our own LoadError exception. * include/ruby/intern.h: add declaration for rb_loaderror_with_path. * test/ruby/test_require.rb: add supporting test for LoadError#path method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-17* missing/setproctitle.c (ruby_init_setproctitle): changed prefix.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-31* ruby.c (load_file_internal): convert the encoding of load path ifusa
needed by platform. calling open() was replaced by rb_cloexec_open() at r33549, but the function expected UTF-8 pathname on Windows. (open() expected "locale" pathname.) reported by taco via IRC. * ruby.c (load_file): change the type of the 2nd parameter to pass its encoding to load_file_internal(). * ruby.c (process_options, rb_load_file): follow above change. NOTE: we should pass encoding information to rb_load_file(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-30* ruby.c (fill_standard_fds): use fstat() instead of fcntl(F_GETFD)akr
for MinGW. reported by Luis Lavena. [ruby-core:40526] [Bug #5516] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-30* ruby.c (fill_standard_fds): new function to open closed standardakr
file descriptors. (ruby_sysinit): call fill_standard_fds. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-29* process.c (ruby_setsid): use rb_cloexec_open.akr
(rb_daemon): ditto. * ruby.c (load_file_internal): ditto. * file.c (rb_file_s_truncate): ditto. (file_load_ok): ditto. * random.c (fill_random_seed): ditto. * ext/pty/pty.c (chfunc): ditto. (get_device_once): ditto. * ext/io/console/console.c (console_dev): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-22* include/ruby/intern.h (rb_fd_set_cloexec): declared.akr
* io.c (rb_fd_set_cloexec): new function. (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag. (rb_sysopen_internal): ditto. (rb_pipe): ditto. (io_reopen): ditto. (io_cntl): ditto. * process.c (rb_f_exec): change the default :close_others option to true. (rb_f_system): ditto. (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set close-on-exec flag. (ruby_setsid): ditto. (rb_daemon): ditto. * thread_pthread.c (rb_thread_create_timer_thread): call rb_fd_set_cloexec to set close-on-exec flag. * ruby.c (load_file_internal): ditto. * file.c (rb_file_s_truncate): ditto. (file_load_ok): ditto. * random.c (fill_random_seed): ditto. * ext/pty/pty.c (chfunc): ditto. (get_device_once): ditto. * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto. * ext/socket/init.c (rsock_socket): ditto. (rsock_s_accept_nonblock): ditto. (rsock_s_accept): ditto. * ext/socket/socket.c (rsock_sock_s_socketpair): ditto. * ext/socket/ancdata.c (discard_cmsg): ditto. (make_io_for_unix_rights): ditto. * ext/socket/unixsocket.c (unix_recv_io): ditto. * ext/io/console/console.c (console_dev): ditto. [ruby-core:38140] [Feature #5041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-29* use RB_TYPE_P which is optimized for constant types, instead ofnobu
comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-20* include/ruby/intern.h (rb_update_max_fd): declaration moved fromakr
internal.h. * file.c: ditto. * io.c: call rb_update_max_fd for each new fds. * process.c: ditto. * random.c: ditto. * ruby.c: ditto. * ext/io/console/console.c: ditto. * ext/openssl/ossl_bio.c: ditto. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-07* encoding.c (rb_enc_set_index, rb_enc_associate_index): shouldnobu
check if frozen. * parse.y (rb_intern3), ruby.c (process_options, ruby_script): defer freezing after associating encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29* ruby.c (ruby_init_loadpath_safe): ensure RUBYLIB_PREFIX storednobu
before RUBYLIB, even if MANGLED_PATH is enabled. fixed #1679. MANGLED_PATH is disabled by the default and will be removed completely in the future. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29 * math.c: Attach documentation for Math.drbrain
* object.c: Document NIL, TRUE, FALSE. * io.c: Improve grammar in ARGF comment. Document STDIN/OUT/ERR. Document ARGF global constant. * lib/rake: Hide deprecated toplevel constants from RDoc (import from rake trunk). * lib/thwait.rb: Document ThWait. * lib/mathn.rb: Hide Math redefinition from RDoc * lib/sync.rb: Add a basic comment for Sync_m, Synchronizer_m, Sync, Synchronizer. * parse.y: Document SCRIPT_LINES__. * hash.c: Document ENV class and global constant. * vm.c: Document TOPLEVEL_BINDING. * version.c: Document RUBY_* constants. * ruby.c: Document DATA and ARGV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32281 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
2011-06-11* ruby.c (ruby_process_options): add missing return type.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-14introduce missing/setproctitle.ckosaki
* include/ruby/missing.h: add setproctitle() declaration. * missing/setproctitle.c: added. * configure.in: add check for missing/setproctitle.c. * ruby.c (ruby_process_options): add to call compat_init_setproctitle(). * ruby.c (set_arg0): remove all platform specific code. it's moved to missing/setproctitle.c. * ruby.c (origarg): remove len field. It's no longer used. * ruby.c (get_arglen): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-15* ruby.c (proc_options): reduce warning: "ALLOW_DEFAULT_SOURCE_ENCODING" is ↵kazu
not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-22* ruby.c (proc_options): remove an experimental feature: --gem option.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-22* ruby.c (proc_options): remove an experimental feature: --requirenobu
option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-22* ruby.c (add_gems): remove unused variable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07* gc.c (rb_gc_set_params): allow GC parameter configuration bymatz
environment variables. based on a patch from funny-falcon at https://gist.github.com/856296, but honors safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-11* ruby.c (proc_options): enable rubygems if --gem option is given.nobu
* ruby.c (process_options): load rubygems if it is disabled but --gem option is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-11* ruby.c (proc_options): add --gem=enabled as an alias ofyugui
--enable=gems and --gem=disabled as an alias of --disable=gems. Gem named "enabled" or "disabled" has already been reserved legitimately for this purpose. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-11* ruby.c (add_gems, require_libraries, proc_options): addnobu
--require and --gem options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-11* configure.in (rubygems): add --disable-rubygems option.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-17* ruby.c (process_options): revert r30549.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-15* ruby.c (process_options): autoload rubygems.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-15* ruby.c (ruby_init_prelude): get rid of global namespacenobu
pullution. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-14Reduced gem_prelude to just require rubygems. Reviewed by Evan Phoenixryan
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-27* ruby.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-10* ruby.c (ruby_init_loadpath_safe): relatively called non-sharednobu
binary cannot be found in PATH, so use given pathname. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-05* ruby.c (load_file_internal): decrement for ungotten line.nobu
[ruby-dev:42680] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11* file.c (file_expand_path): use cygwin_conv_path on cygwin 1.7 ornobu
later. * ruby.c (push_include_cygwin): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-09* cygwin/GNUmakefile.in (scriptbin): make executable file fromnobu
scripts with stub. * ruby.c (load_file_internal): assume xflag for exe file as well as no-shebang file. * tool/rbinstall.rb: install script programs. * win32/mkexports.rb (Exports#initialize): alias ruby_sysinit for stub. * win32/stub.c: stub for scripts. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* ruby.c (ruby_init_loadpath_safe): ensure sopath to be modifiablenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02* ruby.c (ruby_init_loadpath_safe): rb_str_set_len modifies ptrnobu
since r26303. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-27* include/ruby/io.h, io.c: reverted r21709.nobu
* ruby.c (load_file_internal): nothing to read if EOF reached while reading shebang. [ruby-core:30910] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-18* ruby.c: add prototype of rb_realpath_internal.naruse
* load.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-17* load.c (rb_load_internal): remove call to rb_realpath_internalmame
within rb_load_internal which caused big performance degradation. Instead, call rb_realpath_internal in the caller of rb_load_internal. [ruby-dev:41502] [ruby-dev:41610] * vm.c (rb_vm_call_cfunc): ditto. * eval_intern.h (rb_vm_call_cfunc): ditto. * ruby.c (process_options): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-05* ruby.c (process_options, load_file_internal): $0 seen fromnobu
required libraries by -r option should be the main script. [ruby-core:23717] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-05* ruby.c (process_options): revert r25330, so that $0 can be seennobu
from required libraries by -r option. [ruby-core:23717] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-21* suppress warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-21* ruby.c (ruby_init_loadpath_safe): use real path for non-sharednobu
build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27939 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