rb_io_fread() by freezing it temporarily. [ruby-dev:24479]
* dir.c (rb_push_glob): block call at once the end of method.
[ruby-dev:24487]
* ext/enumerator/enumerator.c (enum_each_slice): remove
rb_gc_force_recycle() to prevent potential SEGV.
[ruby-dev:24499]
* ext/zlib/zlib.c (zstream_expand_buffer): hide internal string
buffer by clearing klass. [ruby-dev:24510]
* ext/socket/socket.c (sock_s_getservbyaname): protocol string
might be altered. [ruby-dev:24503]
* string.c (rb_str_upto): check if return value from succ is a
string. [ruby-dev:24504]
* io.c (rb_io_popen): get mode string via rb_io_flags_mode() to
avoid mode string modification. [ruby-dev:24454]
* io.c (rb_io_getline_fast): should take delim as unsigned char to
distinguish EOF and '\377'. [ruby-dev:24460]
* io.c (rb_io_getline): add check for RS modification.
[ruby-dev:24461]
* enum.c (enum_sort_by): use qsort() directly instead using
rb_iterate(). [ruby-dev:24462]
* enum.c (enum_each_with_index): remove rb_gc_force_recycle() to
prevent access to recycled object (via continuation for
example). [ruby-dev:24463]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7071 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
assignment.
* eval.c (assign): ditto.
* eval.c (rb_call0): update ruby_frame->argv with the default
value used for the optional arguments.
* object.c (Init_Object): "===" calls rb_obj_equal() directly.
[ruby-list:39937]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6703 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
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
[ruby-dev:22654]
* pack.c (pack_pack): do not auto convert nil to zero.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/cgi.rb (CGI::QueryExtension): give extended string, not a
delegater object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
install rdoc, specify --disable-install-doc.
* eval.c (eval): need to add message delimiter. [ruby-dev:22561]
* defines.h (__NeXT__): Ensure that all standard S_IRUSR, S_IWGRP,
S_IRWXO, etc. macros are defined since future code might require
them (even though present code only requires a subset).
* defines.h (__NeXT__): Bug fix: WORDS_BIGENDIAN was not being set
correctly on Rhapsody when -arch compiler flag was used (via
configure's --enable-fat-binary option).
* ext/socket/socket.c (make_hostent): getaddrinfo(3) on BSD do not
fill ai_canonname if serv is not supplied. (ruby-bugs PR#1243)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
section. [ruby-dev:20490]
* eval.c (compile): put rb_compile_string() in a thread critical
section.
* variable.c (rb_const_get_0): should not warn if constant is not
defined. (ruby-bugs-ja PR#509)
* bignum.c (rb_big2dbl): give a warning on overflow.
(ruby-bugs-ja PR#510)
* util.c (ruby_strtod): change MDMAXEXPT from 511 to 308.
* pack.c (utf8_to_uv): long is sufficient. LONG_LONG is not
required.
* bignum.c (rb_big2str): support 32 bit (without `long long' type)
machines. (ruby-bugs-ja PR#512)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4050 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3867 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
moved to rb_obj_alloc(). (ruby-bugs-ja PR#345)
* re.c (rb_reg_quote): should escape white space characters,
\t, \f, \n, \r. (ruby-bugs-ja PR#231)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_values_at,env_values_at): ditto.
* re.c (match_values_at): ditto.
* struct.c (rb_struct_values_at): ditto.
* re.c (match_select): add iterator behavior.
* ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c,
ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up
"_FILE_OFFSET_BITS redefined" warning on Solaris.
* class.c (rb_class_protected_instance_methods): now gives
warnings to show migration path. The default will be reversed
on Jan 2004.
* numeric.c (num_step): "1.1.step(1.5,0.1)" to work.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3754 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
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3646 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3633 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
receiver is an instance of subclass of Array.
* string.c (rb_str_to_s): return value should be a String if the
receiver is an instance of subclass of String.
* eval.c (rb_call): calls method_missing when superclass method
does not exist.
* eval.c (rb_f_missing): now handles "no super" case.
* object.c (rb_obj_ivar_get): Object#instance_variable_get: new
method to get instance variable value without eval(). [new]
* object.c (rb_obj_ivar_set): Object#instance_variable_set: new
method to set instance variable value without eval(). [new]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
internally.
* re.c (rb_reg_initialize_m): should honor option status of
original regexp.
* array.c (rb_ary_equal): ary2 should be T_ARRAY (no to_ary
conversion).
* array.c (rb_ary_eql): ditto.
* string.c (rb_str_equal): str2 should be T_STRING (no to_str
conversion).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/profiler.rb: separate profiling functions, without
trace_func and at_exit setting.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (cmd_brace_block): new tLBRACE_ARG block rule
* parse.y (command): can take optional cmd_brace_block; use %prec
to resolve shift/reduce conflict. (ruby-bugs-ja PR#372)
* eval.c (ruby_finalize): trace_func should be cleared here (after
executing exit procs and finalizers).
* eval.c (rb_define_alloc_func): new allocation framework, based
on Nobu's work [ruby-dev:19116]. "allocate" method is no longer
used for object allocation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_check_array_type): new function: return an array
(convert if possible), or nil.
* string.c (rb_check_string_type): new function: return a string
(convert if possible), or nil.
* numeric.c (rb_dbl_cmp): returns nil if values are not
comparable.
* numeric.c (fix_cmp,flo_cmp): use rb_num_coerce_cmp()
* bignum.c (rb_big_cmp): ditto.
* numeric.c (rb_num_coerce_cmp): new coercing function for "<=>",
which does not raise TypeError.
* numeric.c (do_coerce): can be supress exception now.
* object.c (rb_mod_cmp): should return nil for non class/module
objects.
* re.c (rb_reg_eqq): return false if the argument is not a
string. now returns boolean value.
* class.c (rb_include_module): argument should be T_MODULE, not
T_class, nor T_ICLASS.
* eval.c (is_defined): "defined?" should return "assignment" for
attribute assignment (e.g. a.foo=b) and indexed assignment
(e.g. a[2] = 44).
* parse.y (aryset): use NODE_ATTRASGN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
still left; removed.
* sprintf.c (rb_f_sprintf): should not prepend '0' if width > prec
for example "%5.3d".
* process.c (Init_process): add Process.exit and Process.abort
* pack.c (utf8_to_uv): raise ArgumentError for malformed/redundant
UTF-8 sequences.
* process.c (last_status_set): add pid attribute to Process::Status.
* pack.c (uv_to_utf8): limit maximum length of the encoded string
to 6 bytes, even when the platform supports 8 bytes long integers.
* pack.c (utf8_to_uv): do not decode sequences longer than 6 bytes.
* object.c (copy_object): use "copy_object" method, not "become".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (rb_gc_copy_finalizer): new function to copy finalizers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
public_method_defined?, private_method_defined?,
protected_method_defined?
* object.c (rb_obj_public_methods): new method
Object#public_methods.
* class.c (ins_methods_i): Object#methods should list both public
and protected methods.
* class.c (rb_class_public_instance_methods): new method
Module#public_instance_methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
bits if x is negative.
* bignum.c (bigdivmod): len for bignum zero is 1, not 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to obj.meta.meta.super (ruby-bugs-ja:PR#324).
* parse.y (yylex): the warning message "invalid
character syntax" was never issued.
* marshal.c (r_bytes): do not use alloca (ruby-bugs:PR#382).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
variable table if it existes.
* class.c (rb_make_metaclass): metaclass of a metaclass is a
metaclass itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c (rb_find_file_ext): ditto.
* range.c (range_eq): class check should be based on range.class,
instead of Range to work with Range.dup.
* range.c (range_eql): ditto.
* class.c (rb_mod_dup): need to preserve metaclass and flags.
* object.c (rb_cstr_to_dbl): had a buffer overrun.
* marshal.c (w_class): integrate singleton check into a funciton
to follow DRY principle.
* marshal.c (w_uclass): should check singleton method.
* object.c (rb_obj_dup): dmark and dfree functions must be match
for T_DATA type.
* object.c (rb_obj_dup): class of the duped object must be match
to the class of the original.
* re.c (rb_reg_quote): do not escape \t, \f, \r, \n, for they are
not regular expression metacharacters.
* time.c (time_s_alloc): use time_free instead of free (null check,
also serves for type mark).
* time.c (time_s_at): check dfree function too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
big2dbl().
* bignum.c (Init_Bignum): rb_big_zero_p() removed. There may be
Bignum zero.
* eval.c (rb_call0): new argument added for original method name.
preserve original method name in frame->orig_func.
* eval.c (is_defined): use frame->orig_func, not last_func.
* eval.c (rb_eval): ditto.
* eval.c (method_call): supply data->oid also to rb_call0().
* object.c (rb_class_allocate_instance): call rb_obj_alloc() when
called from alias, thus invoke original "allocate".
* eval.c (remove_method): removing allocate from classes should
cause NameError.
* hash.c (rb_hash_equal): should check default values.
* ext/socket/socket.c (s_recvfrom): update RSTRING len.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_any_to_a): declare Object#to_a to be obsolete.
* object.c (rb_Array): do not convert nil into [] automagically.
* object.c (rb_Integer): use "to_int" instead of
"to_i". [experimental]
* object.c (nil_to_f): new method.
* object.c (rb_Integer): Symbols and nil should cause error.
* object.c (rb_Float): nil should cause error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
* io.c (rb_io_mode_modenum): ditto.
* gc.c (rb_memerror): rename from mem_error, and exported.
* gc.c (Init_GC): pre-allocate NoMemoryError instance.
* object.c (convert_type): error message changed from "failed to
convert" to "cannot convert", since it does not try to convert
if an object does not respond to the converting method.
* eval.c (block_pass): convert Method to Proc using
rb_check_convert_type().
* object.c (rb_check_convert_type): always convert T_DATA
* eval.c (rb_thread_cleanup): should not terminate main_thread by
Fatal error.
* regex.c (is_in_list): need to not exclude NUL and NEWLINE.
* re.c (rb_reg_expr_str): wrong backslash escapement.
* re.c (rb_reg_expr_str): do not escape embedded space
characters.
* marshal.c (w_object): T_DATA process patch from Joel VanderWerf
<vjoel@PATH.Berkeley.EDU>. This is temporary hack; it remains
undocumented, and it will be removed when marshaling is
re-designed.
* marshal.c (r_object): ditto.
* numeric.c (num_step): Integer#step is moved to Numeric#step;
Fixnum#step is merged into this method.
* numeric.c (int_dotimes): Fixnum#times is merged.
* numeric.c (int_upto): Fixnum#upto is merged.
* numeric.c (int_downto): Fixnum#downto is merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
singleton cbase.
* eval.c (is_defined): adopt new cvar behavior.
* eval.c (rb_eval): ditto.
* eval.c (assign): ditto.
* class.c (rb_mod_clone): should not call rb_obj_clone(), since
Module does not provide "allocate".
* class.c (rb_singleton_class): should crate new singleton class
if obj is a class or module and attached object is different,
which means metaclass of singleton class is sought.
* time.c (time_s_alloc): now follows allocation framework.
* eval.c (rb_eval): should initialize outer class variables from
methods in singleton class definitions.
* eval.c (assign): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
singleton methods.
* object.c (rb_mod_to_s): better description.
* hash.c (env_select): should path the assoc list.
* process.c (rb_syswait): thread kludge; should be fixed to
support native thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
only, no methods.
* eval.c (is_defined): should not dump core on defined?(a::b)
where a is not a class nor a module.
* object.c (Init_Object): remove dup and clone from TrueClass,
FalseClass, and NilClass.
* array.c (rb_ary_fill): Array#fill takes block to get the value to
fill.
* string.c (rb_str_to_i): to_i(0) auto-detects base radix.
* array.c (rb_ary_initialize): fill by the block evaluation value
if block is given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_mod_initialize): should accept zero argument.
* object.c (rb_mod_cmp): should raise ArgumentError if
inheritance/inclusion relation between two classes/modules is
not defined. [new]
* io.c (rb_io_fsync): new method. [new]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c (rb_cstr2inum): reject prefix followed by spaces only.
* class.c (rb_class_inherited): should use Object when no super
class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_set_default): Hash#default= should return the
new value.
* string.c (rb_str_to_i): accepts optional base argument. [new]
* numeric.c (rb_fix2str): should not handle negative fixnum values
int32 via calling sprintf() directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (pipe_open): ditto.
* defines.h: sparc linux needs different FLUSH_REGISTER_WINDOWS
* regex.c (re_search): abandon stclass optimization.
* bignum.c (rb_cstr2inum): deny "0_".
* bignum.c (rb_cstr2inum): allow "0\n" and so on.
* error.c (rb_invalid_str): utility function to show inspect()'ed
string.
* bignum.c (rb_cstr2inum): prints invalid strings in inspect()'ed
format.
* object.c (rb_Float): ditto.
* object.c (rb_convert_type): no longer use rb_rescue().
* re.c (rb_reg_search): initialize taint status of match object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
modifying buffer is shared.
* array.c (ary_make_shared): make an internal buffer of an array
to be shared.
* array.c (rb_ary_shift): avoid sliding an internal buffer by
using shared buffer.
* array.c (rb_ary_subseq): avoid copying the buffer.
* parse.y (gettable): should freeze __LINE__ string.
* io.c (rb_io_puts): old behavoir restored. rationale: a) if you
want to call to_s for arrays, you can just call print a, "\n".
b) to_s wastes memory if array (and sum of its contents) is
huge. c) now any object that has to_ary is treated as an array,
using rb_check_convert_type().
* hash.c (rb_hash_initialize): now accepts a block to calculate
the default value. [new]
* hash.c (rb_hash_aref): call "default" method to get the value
corrensponding to the non existing key.
* hash.c (rb_hash_default): get the default value based on the
block given to 'new'. Now it takes an optinal "key" argument.
"default" became the method to get the value for non existing
key. Users may override "default" method to change the hash
behavior.
* hash.c (rb_hash_set_default): clear the flag if a block is given
to 'new'
* object.c (Init_Object): undef Data.allocate, left Data.new.
* ext/curses/curses.c (window_scrollok): use RTEST().
* ext/curses/curses.c (window_idlok): ditto.
* ext/curses/curses.c (window_keypad): ditto.
* ext/curses/curses.c (window_idlok): idlok() may return void on
some platforms; so don't use return value.
* ext/curses/curses.c (window_scrollok): ditto for consistency.
* ext/curses/curses.c: replace FIX2INT() by typechecking NUM2INT().
* parse.y (str_extend): should not process immature #$x and
#@x interpolation, e.g #@#@ etc.
* enum.c (enum_sort_by): sort_by does not have to be stable always.
* enum.c (enum_sort_by): call qsort directly to gain performance.
* util.c (ruby_qsort): ruby_qsort(qs6) is now native thread safe.
* error.c (rb_sys_fail): it must be a bug if it's called when
errno == 0.
* regex.c (WC2MBC1ST): should not pass through > 0x80 number in UTF-8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (num_clone): Numeric should not be copied by clone.
* object.c (rb_obj_clone): should check immediate values.
* parse.y (command): `yield' should take command_args.
* parse.y (parse_quotedwords): %w(...) is not a string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e