normalizing the result. x should be a big number.
[ruby-dev:26778]
* bignum.c (rb_big_pow): use rb_big_mul0() instead of
rb_big_mul().
* array.c (rb_ary_or, rb_ary_and, rb_ary_plus, rb_ary_diff):
revert the change on 2005-08-03. Set operation on other item
should have in separate methods.
* parse.y (shadowing_lvar_gen): warn when arguments shadows
external local variables.
* parse.y (f_opt): optional arguments should not clobber external
local variables.
* parse.y (f_rest_arg): rest arguments should not clobber external
local variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
suggested by Bertram Scharpf <lists@bertram-scharpf.de> in
[ruby-talk:134083].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_exec_recursive() in eval.c.
* eval.c (rb_exec_recursive): new function.
* array.c (rb_ary_join): use rb_exec_recursive().
* array.c (rb_ary_inspect, rb_ary_hash): ditto.
* file.c (rb_file_join): ditto.
* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.
* io.c (rb_io_puts): ditto.
* object.c (rb_obj_inspect): ditto
* struct.c (rb_struct_inspect): ditto.
* lib/set.rb (SortedSet::setup): a hack to shut up warning.
[ruby-talk:132866]
* lib/time.rb (Time::strptime): add new function. inspired by
[ruby-talk:132815].
* lib/parsedate.rb (ParseDate::strptime): ditto.
* regparse.c: move st_*_strend() functions from st.c. fixed some
potential memory leaks.
* exception error messages updated. [ruby-core:04497]
* ext/socket/socket.c (Init_socket): add bunch of Socket
constants. Patch from Sam Roberts <sroberts@uniserve.com>.
[ruby-core:04409]
* array.c (rb_ary_s_create): no need for negative argc check.
[ruby-core:04463]
* array.c (rb_ary_unshift_m): ditto.
* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
of StandardError class, not Exception class. [ruby-core:04429]
* parse.y (fcall_gen): lvar(arg) will be evaluated as
lvar.call(arg) when lvar is a defined local variable. [new]
* object.c (rb_class_initialize): call inherited method before
calling initializing block.
* eval.c (rb_thread_start_1): initialize newly pushed frame.
* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
fixed: [ruby-core:04444]
* eval.c (is_defined): NODE_IASGN is an assignment.
* ext/readline/readline.c (Readline.readline): use rl_outstream
and rl_instream. [ruby-dev:25699]
* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
[ruby-dev:25675]
* misc/ruby-mode.el: [ruby-core:04415]
* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]
* lib/rdoc/generators/ri_generator.rb: ditto.
* struct.c (make_struct): fixed: [ruby-core:04402]
* ext/curses/curses.c (window_color_set): [ruby-core:04393]
* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
[ruby-talk:130092]
* object.c: [ruby-doc:818]
* parse.y (open_args): fix too verbose warnings for the space
before argument parentheses. [ruby-dev:25492]
* parse.y (parser_yylex): ditto.
* parse.y (parser_yylex): the first expression in the parentheses
should not be a command. [ruby-dev:25492]
* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]
* object.c (Init_Object): remove Object#type. [ruby-core:04335]
* st.c (st_foreach): report success/failure by return value.
[ruby-Bugs-1396]
* parse.y: forgot to initialize parser struct. [ruby-dev:25492]
* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
[ruby-talk:127711]
* document updates - [ruby-core:04296], [ruby-core:04301],
[ruby-core:04302], [ruby-core:04307]
* dir.c (rb_push_glob): should work for NUL delimited patterns.
* dir.c (rb_glob2): should aware of offset in the pattern.
* string.c (rb_str_new4): should propagate taintedness.
* env.h: rename member names in struct FRAME; last_func -> callee,
orig_func -> this_func, last_class -> this_class.
* struct.c (rb_struct_set): use original method name, not callee
name, to retrieve member slot. [ruby-core:04268]
* time.c (time_strftime): protect from format modification from GC
finalizers.
* object.c (Init_Object): remove rb_obj_id_obsolete()
* eval.c (rb_mod_define_method): incomplete subclass check.
[ruby-dev:25464]
* gc.c (rb_data_object_alloc): klass may be NULL.
[ruby-list:40498]
* bignum.c (rb_big_rand): should return positive random number.
[ruby-dev:25401]
* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
random bignums. [ruby-dev:25396]
* variable.c (rb_autoload): [ruby-dev:25373]
* eval.c (svalue_to_avalue): [ruby-dev:25366]
* string.c (rb_str_justify): [ruby-dev:25367]
* io.c (rb_f_select): [ruby-dev:25312]
* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]
* struct.c (make_struct): [ruby-dev:25249]
* dir.c (dir_open_dir): new function. [ruby-dev:25242]
* io.c (rb_f_open): add type check for return value from to_open.
* lib/pstore.rb (PStore#transaction): Use the empty content when a
file is not found. [ruby-dev:24561]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_update): a[n,m]=nil no longer works as element
deletion.
* enum.c (enum_sort_by): protect continuation jump in.
[ruby-dev:24642]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-talk:117841]
* ruby.h (FL_ABLE): nodes are not subject for flag operations.
* io.c (ARGF_FORWARD): should have specified argv explicitly,
since we no longer have frame->argv saved. [ruby-dev:24602]
* string.c (RESIZE_CAPA): check string attribute before modifying
capacity member of string structure. [ruby-dev:24594]
* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
performance. [ruby-talk:117701]
* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
arguments, unless (digit)$ style used.
* io.c (rb_io_fptr_finalize): leave stdin/stdout/stderr open in
interpreter termination. [ruby-dev:24579]
* eval.c (frame_free): Guy Decoux solved the leak problem.
Thanks. [ruby-core:03549]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
the class of right operand. [ruby-dev:24526]
* ext/zlib/zlib.c (zstream_detach_buffer): should not expose
class-less object to Ruby world. [ruby-dev:24530]
* eval.c (proc_dup): provide Proc#dup as well. [ruby-talk:116915]
* eval.c (ruby_exec): stack marking position may be higher than
expected. thanks to Guy Decoux. [ruby-core:03527]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_io_flags_mode): requires output buffer no more. no
allocation needed.
* array.c (rb_ary_index): takes a block to compare items in an
array. [ruby-talk:113069] [Ruby2]
* array.c (rb_ary_rindex): ditto.
* marshal.c (r_byte): retrieve pointer from string value for each
time. [ruby-dev:24404]
* marshal.c (r_bytes0): ditto.
* enum.c (sort_by_i): re-entrance check added. [ruby-dev:24399]
* io.c (io_read): should freeze all reading buffer.
[ruby-dev:24400]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-dev:24348]
* array.c (rb_ary_fill): fill should honor length argument.
[ruby-dev:24346]
* array.c (rb_ary_replace): should not use ptr from shared array.
[ruby-dev:24345]
* ext/socket/socket.c (s_accept): don't retry for EWOULDBLOCK.
[ruby-talk:113807]
* array.c (flatten): element size might change during comparison.
[ruby-dev:24343]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[llama@u01.gate0]
* parse.y (rb_parser_while_loop): ditto.
* array.c (rb_ary_subseq): original object might be modified after
sharing data creation. [ruby-dev:24327]
* array.c (rb_ary_replace): ditto.
* array.c (ary_make_shared): freeze shared array. [ruby-dev:24325]
* struct.c (struct_members): always check struct size and size of
members list in the class. [ruby-dev:24320]
* string.c (rb_str_sub_bang): check if string is not modified
during iteration. [ruby-dev:24315]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
size. [ruby-dev:24273]
* parse.y: make ruby parser reentrant. merge ripper parser to the
real one. this change makes ruby require bison.
* file.c (rb_file_truncate): clear stdio buffer before truncating
the file. [ruby-dev:24191]
* ext/digest/digest.c: use rb_obj_class() instead of CLASS_OF
which might return singleton class. [ruby-dev:24202]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_pop_m, rb_ary_shift_m): take arg to behave as push
and unshift.
* array.c (rb_ary_first, rb_ary_last): make shared array for result
array, and correct doc for Array#first(n) and Array#last(n)
* array.c (rb_ary_select): not accept any arg.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: ditto.
* ext/dbm/dbm.c: remove #indexes, #indices, "values_at" warning
from #select.
* ext/gdbm/gdbm.c: ditto.
* ext/sdbm/init.c: ditto.
* ext/dbm/dbm.c (Init_dbm): set VERSION constant as "unknown" when
DB_VERSION_STRING is not available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
is same to @end. [ruby-talk:100269]
* string.c (rb_str_new4): should not reuse frozen shared string if
the original is not an instance of String. [ruby-talk:100193]
* time.c (time_mdump): preserve GMT bit in the marshal data.
[ruby-talk:100213]
* eval.c (is_defined): do not protect exception during receiver
evaluation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
unnecessary line trace for inlined expression.
(ruby-bugs PR#1320)
* numeric.c (flo_to_s): tweak output string based to preserve
decimal point and to remove trailing zeros. [ruby-talk:97891]
* string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM
search. [ruby-talk:97342]
* hash.c (rb_hash_equal): returns true if two hashes have same set
of key-value set. [ruby-talk:97559]
* hash.c (rb_hash_eql): returns true if two hashes are equal and
have same default values.
* string.c (rb_str_equal): always returns true or false, never
returns nil. [ruby-dev:23404]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
path object is not a string. [Ruby2]
* gc.c (rb_gc_call_finalizer_at_exit): do not free threads in the
exit finalizers.
* io.c (rb_io_reopen): should use rb_io_check_io().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-talk:95409]
* eval.c (rb_f_raise): should not clear backtrace information if
exception object already have one.
* parse.y (assoc_list): allow {sym: val} style Hash. [Ruby2]
this change is done by Nobuyoshi Nakada <nobu@ruby-lang.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
one defined in object.c.
* object.c (Init_Object): remove Kernel#to_a.
* enum.c (enum_zip): use "to_a" instead of "to_ary".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
evaluation. [ruby-dev:21834]
* hash.c (rb_hash_fetch): always warn if default argument and a
block are supplied at the same time. [ruby-dev:21842]
* hash.c (env_fetch): ditto.
* array.c (rb_ary_fetch): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4910 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
need to restore previous value. [ruby-talk:77577]
* array.c (rb_ary_fill): array length may be changed during the
block execution. [ruby-talk:77579]
* array.c (rb_ary_zip): ditto.
* array.c (rb_ary_fill): ditto.
* hash.c (env_reject_bang): length may be changed during the block
execution.
* hash.c (env_clear): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e