| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(rb_const_get_at, rb_const_get, rb_mod_remove_const): use Qundef
as autoload marker. [ruby-dev:18103], [ruby-dev:18184]
* eval.c (rb_mod_autoload, rb_mod_autoload_p): new method;
Module#autoload, Module#autoload?.
* variable.c (rb_autoload, rb_autoload_load, rb_autoload_p):
manage autoload constants per classes/modules.
* variable.c (rb_const_defined_at, rb_const_defined): return false
for autoloading constants.
* class.c (rb_define_class, rb_define_module), eval.c (rb_eval),
variable.c (rb_mod_const_at, rb_const_assign): removed autoload
stuff.
* intern.h: prototypes; rb_autoload, rb_autoload_load,
rb_autoload_p.
* lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse):
do not treat unmatched argument as an option.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* eval.c (block_arity): returns exact arity number for Procs out
of methods. also gives 1 for {|a|..}.
* string.c (rb_str_match): revert use of String#index for
invocation like string =~ string.
* eval.c (rb_Array): move Object#to_a exclusion hack from
splat_value(). need to be in eval.c for a while.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
(ruby-bugs-ja:PR473)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
at_exit procs and finalizers. (ruby-bugs-ja:PR473)
* ext/tcltklib/tcltklib.c (lib_mainloop_core): OK to block if
there's no other thread. (ruby-bugs:PR#861)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
rb_call_super() for allocation functions. [ruby-core:1065]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ruby-dev:20269]
* io.c (rb_io_close, io_reopen): ditto.
* io.c (io_reopen): keep stdio objects for stdin, stdout,
and stderr. [ruby-dev:19442]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
subclasses of SystemCallError. in addition, if initialize is
called for SystenCallError instance, its class be changed.
[ruby-dev:20257]
* gc.c (run_final): to protect thread context switch, finalizers
are wrapped in DEFER_INTS/ENABLE_INTS.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
on thread saved ruby_dyna_vars. [ruby-dev:20236]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
block parameter.
* eval.c (rb_yield_values): a function to yield multiple values.
* array.c (sort_1): use rb_yield_values.
* enum.c (min_ii, max_ii): ditto.
* hash.c (rb_hash_update_block_i, delete_if_i, select_i,
each_pair_i, env_each, env_reject_bang, env_select,
env_update_i): ditto.
* struct.c (rb_struct_each_pair): ditto.
* eval.c (top_include): should include module in the current self,
not ruby_top_self. [ruby-dev:20198]
* eval.c (top_include): stop inclusion to ruby_wrapper; give
warning.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
method.
* error.c (rb_name_error, rb_sys_fail): ditto.
* error.c (exc_to_s, exit_status, name_err_name,
nometh_err_args, syserr_errno, syserr_eqq): access
attributes.
* error.c (name_err_initialize, nometh_err_initialize,
syserr_initialize): initialize attributes.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
before detach pid. [ruby-talk:71519]
* eval.c (PUSH_FRAME): save outer ruby_block. [ruby-list:37677],
[ruby-dev:20202]
* eval.c (BEGIN_CALLARGS): restore outer block by using
ruby_block->outer.
* eval.c (block_pass): do not alter block->prev, but block->outer.
* array.c (get_inspect_tbl): warning on wrong condition.
* eval.c (localjump_xvalue): renamed exitstatus to exit_value
since it's not exit "status" after all.
* eval.c (localjump_error): add reason to LocalJumpError.
* compar.c (rb_cmpint): raise error via rb_cmperr(), if cmp value
is nil. now take new 2 arguments.
* time.c (time_cmp): 2003-05-16 fix was incomplete.
(ruby-bugs-ja:PR#458)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
valid array. (ruby-bugs-ja PR#65)
* array.c (inspect_ensure,rb_protect_inspect,rb_inspecting_p):
use get_inspect_tbl().
* eval.c (rb_f_abort): call exit(1) if exception is raised. This
patch was made by Nobuyoshi Nakada <nobu.nokada@softhome.net> on
2002-05-30. (ruby-bugs-ja PR#236)
* signal.c: disable Ruby's interrupt handler at the beginning.
(ruby-bugs-ja PR#236)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* time.c (time_cmp): does not compare with numbers for
interchangeability. (ruby-bugs-ja PR#458)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
directly.
* eval.c (error_print,error_handle,rb_longjmp,rb_thread_schedule):
ditto.
* io.c (Init_IO): new variable $deferr which is default output
port of error messages.
* io.c (rb_warn_m): new method "warn". [new]
* error.c (warn_print): use $deferr.
* error.c (rb_bug): ditto.
* error.c (err_append): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pad string. [ruby-talk:70482]
* string.c (rb_str_rjust): ditto.
* string.c (rb_str_center): ditto.
* string.c (rb_str_justify): utility function.
* eval.c (rb_add_method): call singleton_method_added or
method_added for every method definition (after ruby_running).
[ruby-talk:70471]
* array.c (rb_ary_reverse_bang): Array#reverse! should not return
nil even for arrays sized less than 2.
* io.c (argf_eof): should not block after reading all argument
files. (ruby-bugs-ja PR#449)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* io.c: there's no way to set non-IO value to current_file, thus
no need for argf_forward().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
break like keyword yield. [ruby-talk:70034]
* eval.c (proc_invoke): orphan Proc now raises LocalJumpError for
break and retry again.
* eval.c (rb_eval): ARGSCAT should splat the argument.
* eval.c (splat_value): splat operation function.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
anonymous class/module. (ruby-bugs-ja PR#424)
* config.sub: stop forcing addition of -gnu to -linux.
* variable.c (classname): refactoring.
* variable.c (rb_class_path): __tmp__classpath__ handling moved
from classname().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ruby-talk:68987]
* variable.c (rb_mod_remove_const): ditto.
* object.c (rb_obj_ivar_get): ditto.
* object.c (rb_obj_ivar_set): ditto.
* parse.y (yylex): ditto.
* eval.c (rb_mod_define_method): Allow UnboundMethod as
parameter.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are like instance and its class. [ruby-core:00941]
* parse.y (yylex): disallow global variables like "$1ve".
[ruby-core:00945]
* marshal.c (marshal_dump): Marshal.dump(0, false) should cause an
error. (ruby-bugs-ja PR#421)
* regex.c (re_compile_pattern): warn if '-' is the edge of
character range.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
size check. getnameinfo(3) can handle. [ruby-dev:19967]
* io.c (io_read): do not call rb_sys_fail() when required data
length is zero. (ruby-bugs-ja PR#420)
* eval.c (umethod_proc): should raise TypeError, instead of
returning error causing Proc. Following the principle of "fail
early". [ruby-core:00927]
* pack.c (pack_pack): small but serious typo.
* eval.c (backtrace): skip internal allocator frame.
(ruby-bugs-ja PR#416)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clarify how "to_ary" and "to_a" work. [ruby-talk:68155]
* eval.c (svalue_to_avalue): ditto.
* eval.c (svalue_to_mrhs): ditto.
* eval.c (rb_eval): unary splat to use to_a, but we need a hack to
exclude Object#to_a until it's removed.
* object.c (rb_Array): check obj.respond_to?("to_a"). Currently
all object respond_to "to_a", but Object#to_a will be removed.
* range.c (Init_Range): undefine to_ary.
* re.c (Init_Regexp): ditto.
* regex.c (re_compile_pattern): do not warn if "-" is at the top
or last of character class.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operator.
* eval.c (avalue_to_svalue,svalue_to_avalue,svalue_to_mrhs): do
not use implicit "to_ary" conversion.
* ext/curses/curses.c (GetWINDOW,GetMOUSE): add taint check.
* ext/curses/curses.c (curses_init_screen): ditto.
* ext/curses/curses.c (window_initialize): ditto.
* gc.c (os_each_obj): prohibit ObjectSpace#each_object in safe
mode ($SAFE >= 4).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
parameter |a|. [ruby-dev:19897]
* ruby.c (ruby_set_argv): freeze argument strings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* dir.c (dir_s_getwd): should check rb_secure(4).
* object.c (rb_obj_infect): function version of OBJ_INFECT().
* eval.c (rb_secure_update): new function to check object update.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
brackets and minus in character class. [ruby-dev:19868]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* io.c (read_all): make str empty if given. (ruby-bugs-ja PR#408)
* io.c (io_read): ditto.
* io.c (rb_io_sysread): ditto.
* range.c: do not override min and max.
* sprintf.c (remove_sign_bits): octal left most digit for negative
numbers may be '3'. (ruby-bugs-ja PR#407)
* sprintf.c (rb_f_sprintf): should prefix sign bits if bignum is
negative, using sign_bits().
* eval.c (avalue_to_mrhs): split argument passing and assignment
conversion.
* eval.c (svalue_to_mrhs): ditto.
* eval.c (avalue_to_svalue): avalue_to_svalue([[1,2]]) should be
[[1,2]], not [1,2] to wrap-around.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
be handled before massign() by svalue_to_mrhs().
* eval.c (svalue_to_mrhs): '*a = v' value conversion to avalue
(i.e. [1] => [[1]], [1,2] => [1,2]).
* eval.c (rb_eval): use svalue_to_mrhs.
* eval.c (rb_yield_0): ditto.
* eval.c (proc_invoke): break from "Proc#yield" is legal.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
relative paths too.
* file.c (rb_find_file): world writable directory check if
$SAFE >= 1 (was $SAFE >= 2).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
lhs. [ruby-dev:19766]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* process.c (proc_detach): new method Proc#detach(pid) which
create background watcher thread to issue waitpid. [new]
* process.c (rb_detach_process): utility function to detach
process from C code.
* ext/pty/pty.c (pty_finalize_syswait): terminate watcher thread,
and detach child process (by creating new idle waitpid watcher
thread).
* ext/pty/pty.c (pty_syswait): may lost signal stopped child.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
is not found.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
rb_thread_die(). this change was suggested by Rudi Cilibrasi
<cilibrar@drachma.ugcs.caltech.edu>.
* eval.c (rb_thread_start_0): main thread swapped by fork() may
terminate rb_thread_start_0() successfully. call ruby_stop(0);
this change too was suggested by Rudi.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.y (primary): "self[n]=x" can be legal even when "[]=" is
private. changes submitted in [ruby-talk:63982]
* parse.y (aryset): ditto.
* parse.y (attrset): "self.foo=x" can be legal even when "foo="
is private.
* eval.c (is_defined): private "[]=" and "foo=" support.
* eval.c (rb_eval): ditto.
* eval.c (assign): ditto.
* eval.c (rb_eval): "foo=" should not always be public.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
critical section while context switching. [ruby-talk:64785]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[EXPREIMENTAL]
* eval.c (rb_eval): ditto.
* gc.c (rb_gc_mark_children): ditto.
* parse.y (cpath): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|