[ruby-core:02078]
* io.c (rb_io_getline): should return nil on eof, even when nil rs is
specified. [ruby-core:02077]
* pack.c (pack_pack): add sign check for 'i', and 'l'.
[ruby-dev:22427]
* bignum.c (rb_quad_pack): add range check for 'quad int'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
avoid pthread_mutex_lock() deadlock. interrupts to system calls
are detected by TRAP_END via EINTR error.
* eval.c (thread_timer): do not post signal unless it is
absolutely necessary.
* rubysig.h (TRAP_END): add CHECK_INTS to switch thread.
* regex.c (re_compile_pattern): check if nextp is smaller than
pend. [ruby-dev:22372]
* eval.c (umethod_bind): remove method overridden check.
[ruby-dev:22366]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-dev:22334]
* io.c (argf_read): do not depend on nil at eof behavior of
IO#read().
* eval.c (rb_thread_join): dup exception before re-raising it.
* io.c (rb_io_eof): call clearerr() to prevent side effect. this
patch is supplied by Masahiro Sakai <sakai@tom.sfc.keio.ac.jp>.
[ruby-dev:22234]
* pack.c (OFF16): get offset for big endian machines.
* pack.c (pack_pack): use OFF16 instead of OFF16B.
[ruby-dev:22344]
* pack.c (pack_unpack): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-dev:22329]
* io.c (rb_io_ungetc): need fflush before ungetc if write buffer
is filled. [ruby-dev:22330]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
might be a macro (e.g. on AIX).
* io.c (read_all): do not depend on lseek position.
[ruby-dev:22026]
* eval.c (rb_eval): preserve $! value when retry happens in the
rescue clause. [ruby-talk:86697]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
until real EOF. [ruby-dev:21969]
* io.c (argf_read): should adjust length to read, when length is
specified and read spans command line argument files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
system's alloca. [ruby-core:01503]
* io.c (rb_f_gets): should call next_argv() before type check
current_file. [ruby-list:38336]
* eval.c (proc_invoke): should retrieve retval when pcall is true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-dev:21107]
* marshal.c (w_object): should not call w_extended for USRMARSHAL
dump. [ruby-dev:21106]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (appendline): clearerr(3) before raising exception, since
exception may be captured by rescue. [ruby-talk:77794]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c (w_object): check has been dropped. "_dump must return
string." [ruby-dev:21024]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
* ext/openssl/ossl_ssl.c (TO_SOCKET): define special version when
_WIN32 is defined. this is ruby's problem, not OpenSSL.
* win32/win32.c: remove some old comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-dev:20351]
* io.c (fptr_finalize): ditto.
* string.c (rb_str_rindex_m): fixed wrong fix. should move backward
first only when matching from the end.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
warned for "void value expression". [ruby-talk:72989]
* gc.c (add_final): should determine type by respond_to?
* gc.c (define_final): ditto.
* io.c (rb_io_ctl): should not depend on respond_to?
* range.c (range_step): rb_check_string_type().
* process.c (proc_setgroups): new functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Each END proc should preserve its own $SAFE level. [ruby-core:01119]
* marshal.c (marshal_load): remove unused variable "hash".
[ruby-core:01120]
* hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860]
* array.c (rb_ary_first): optional argument to retrieve first n
elements.
* array.c (rb_ary_last): optional argument to retrieve last n
elements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ranges too.
* range.c (rb_range_beg_len): length calculation was wrong.
* eval.c (rb_call): should set T_ICLASS in the frame->last_class.
[ruby-core:01110]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_check_string_type(), not FIXNUM_P(), because values may be a
bignum. [ruby-talk:72257]
* eval.c (rb_call0): should pass the current klass value to
block_invoke, which may be called via "super". [ruby-core:01077]
* eval.c (block_invoke): now takes 4th argument "klass".
* eval.c (block_alloc): should propagate BLOCK_PROC to
ruby_block.
* marshal.c (r_object0): should not use "yield" method, use "call"
instead. (ruby-bugs-ja PR#476)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3886 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3820 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
before argument parentheses".
* io.c (argf_read): ARGF.read() should read all argument files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e