object, if b has "to_ary" and b == a.
* hash.c (rb_hash_equal): a == b is true when b is non T_HASH
object, if b has "to_hash" and b == a.
* string.c (rb_str_equal): a == b is true when b is non T_STRING
object, if b has "to_str" and b == a.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3442 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
* error.c (Init_Exception): "to_str" removed.
* eval.c (eval): should not rely on Exception#to_str
* eval.c (compile_error): ditto.
* error.c (err_append): ditto.
* hash.c (rb_hash_merge): Hash#merge, non destructive "update".
now there's also Hash#merge! which is an alias to "update".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
if the next argument doesn't start with '-', use it as the
value.
* lib/optparse.rb (OptionParser::make_switch): fixed a bug of
pattern.
* lib/optparse.rb (Array): no need to guard.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hyphen to the first argument of MAKEFLAGS only if appropriate.
Remove wrong comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
there is no such a variable.
* instruby.rb ($mflags.set?), ext/extmk.rb ($mflags.set?): Return
false if unmatched.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/shellwords.rb (shellwords): Use String#lstrip!.
* lib/shellwords.rb (shellwords): Recognize an object that
responds to to_str() by using String.new().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
and emulate a dry run. Use 'make' in case no --make argument is
given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
including FileUtils::Verbose, in order to suppress messages from
FileUtils#cmp.
* lib/fileutils.rb (FileUtils::Verbose, FileUtils::NoWrite):
re-define methods with define_method instead of module_eval.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
bcc32/Makefile.sub: Replace the complicated MFLAGS/MAKEFLAGS
parser with something plain and comprehensible. This fixes a
bug where make flags were wrongly reordered and the resulted
command line often did not make sense especially when BSD make
is used with extra arguments given. Tested with FreeBSD and
Linux by me and mswin32, bccwin32 and mingw by usa.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
with escaped $ and ? at the end of strings. [ruby-talk:62297]
* misc/ruby-mode.el (ruby-font-lock-keywords): added defined?.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (num_quo): should return most exact quotient value,
i.e. float by default, rational if available.
* numeric.c (num_div): "div" should return x.divmod(x)[0].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (negate_lit): new function to negate literal numeric
values in compile time.
* regex.c (re_match_exec): charset info may be stored in MBC
region when $KCODE != NONE.
* error.c (set_syserr): should preserve duplicated error names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e