respond_to? should now take optional second argument; submitted
by Jeremy Kemper <jeremy at bitsweat.net> in [ruby-core:17045].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
BasicObject. [ruby-core:14747]
* lib/delegate.rb: should preserve new methods in BasicObject.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
it now invokes public method only no matter how it's called.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
visibility again. we no longer provide __send, __send!.
* eval.c (rb_invoke_method): new method to honor private
visibility. if it's invoked in a function call style, it calls
private methods as well (previous 1.9 send behavior).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_io_getc): should return nil at EOF, not EOFError.
* lib/delegate.rb (SimpleDelegator::__setobj__): use raise
argument to specify backtrace.
* test/ruby/test_fnmatch.rb (TestFnmatch::bracket_test):
String#include? no longer works for Fixnum. use #chr.
[ruby-dev:31652]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (sym_hash): cache hash value in aux.shared if possible.
* gc.c (rb_obj_id): no need to treat symbols specially.
* lib/fileutils.rb (FileUtils::FileUtils): singleton_methods() no
longer return an array of strings, but of symbols.
* lib/delegate.rb (DelegateClass): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
proc object. [ruby-dev:28146]
* test/drb/drbtest.rb (DRbService::self.ext_service): increase
timeout limit. a patch from Kazuhiro NISHIYAMA
<zn at mbf.nifty.com>. [ruby-dev:28132]
* eval.c (ev_const_get): fixed a bug in constant reference during
instance_eval. [yarv-dev:707]
* eval.c (ev_const_defined): ditto.
* lib/yaml.rb (YAML::add_domain_type): typo fixed. a patch from
Joel VanderWerf <vjoel at path.berkeley.edu>.
[ruby-talk:165285] [ruby-core:6995]
* ext/digest/sha2/sha2.c (ULL): support AIX C. a patch from
Kailden <kailden at gmail.com>. [ruby-core:06984]
* ext/syck/rubyext.c (rb_syck_compile): avoid potential memory
leak.
* ext/syck/rubyext.c (syck_set_ivars): avoid potential memory
leak by explicit symbol allocation.
* lib/delegate.rb (Delegator::method_missing): should delegate
block as well.
* lib/cgi.rb (CGI::QueryExtension::MorphingBody): fix criteria to
use Tempfile. A fix from Zev Blut <rubyzbibd at ubit.com>.
[ruby-core:06076]
* string.c: remove global functions work on $_.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
reduce coercing when a method knows about a operand type.
[ruby-dev:26789]
* lib/delegate.rb: simplifies Delegator classes; SimpleDelegator
now uses method_missing for all methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_exit(). [ruby-dev:26347]
* eval.c (rb_thread_signal_exit): a new function to exit on main
thread.
* eval.c (rb_thread_switch): exit status should be retrieved from
ruby_errinfo.
* eval.c (rb_f_exit): ensure exit(0) should call
exit(EXIT_SUCCESS).
* missing/mkdir.c: remove. [ruby-core:05177]
* hash.c (env_aset): do not treat nil as key-removing value.
[ruby-list:40865]
* parse.y (method_call): allow aref expression ([]) to take a
block.
* parse.y (block_dup_check): a function to check duplication of
a block argument and an actual block.
* lib/delegate.rb (SimpleDelegator::__setobj__): need check for
recursive delegation. [ruby-core:04940]
* lib/cgi.rb: add underscore aliases CGI::escape_html,
CGI::unescape_html, CGI::escape_element, CGI::unescape_element.
[ruby-core:05058]
* misc/ruby-mode.el (ruby-expr-beg): fix looking point drift.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8613 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
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
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
String#[] if more than one arguments are specified.
* lib/delegate.rb: avoid using common instance name as "@obj".
* lib/cgi.rb (CGI::QueryExtension::Value): Value is no longer
subclass of String, but DelegateClass(String).
* ext/curses/extconf.rb: restore function check for init_color.
[ruby-list:38905]
* Makefile.in: need to specify $(MAINLIBS) for the miniruby
generation rule.
* configure.in: better FreeBSD -lc_r support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5206 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
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
warnings to show migration path.
* lib/delegate.rb (Delegator::initialize): instance_methods
etc. now recurse by default. need to specify false.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
asin, acosh, atanh, log, log10 and sqrt.
* eval.c (rb_add_method): initialize should always be private.
* parse.y (expr): add rescue modifier rule.
* parse.y (command_call): return, break and next with argument is
now part of this rule.
* parse.y (yylex): "a" in "a /5" should be considered as a local
variable. [experimental]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (pst_wstopsig): returns nil unless WIFSTOPPED() is
non-zero.
* process.c (pst_wtermsig): returns nil unless WIFSIGNALED() is
non-zero.
* process.c (pst_wexitstatus): returns nil unless WIFEXITED() is
non-zero.
* eval.c (rb_thread_select): tv_sec and tv_usec should not be
negative.
* signal.c (posix_signal): do not set SA_RESTART for SIGVTALRM.
* parse.y (call_args2): block_arg may follow the first argument in
call_args2.
* eval.c (stack_check): should avoid stack length check during
raising SystemStackError exception.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
POSIX_SIGNAL is defined.
* eval.c (error_print): errat array may be empty.
* eval.c (rb_eval_cmd): should not upgrade safe level unless
explicitly specified by argument newly added.
* signal.c (sig_trap): should not allow tainted trap closure.
* variable.c (rb_f_trace_var): should not allow trace_var on safe
level higher than 3.
* variable.c (rb_f_trace_var): should not allow tainted trace
closure.
* gc.c: do not use static stack until system stack overflows.
* eval.c (eval): should call Exception#exception instead of
calling rb_exc_new3() directly.
* error.c (exc_exception): set "mesg" directly to the clone. it
might be better to set mesg via some method for flexibility.
* variable.c (cvar_override_check): should print original module
name, if 'a' is T_ICLASS.
* parse.y (yylex): float '1_.0' should not be allowed.
* variable.c (var_getter): should care about var as Qfalse
(ruby-bugs#PR199).
* array.c (cmpint): <=> or block for {min,max} may return bignum.
* array.c (sort_1): use rb_compint.
* array.c (sort_2): ditto.
* enum.c (min_ii): ditto.
* enum.c (min_ii): ditto.
* enum.c (max_i): ditto.
* enum.c (max_ii): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (cond0): no special treatment of string literal in
condition.
* math.c: add acos, asin, atan, conh, sinh, tanh and hypot to Math.
* configure.in: check hypot availablility.
* missing/hypot.c: public domain rewrite of hypot.
* parse.y (warn_unless_e_option): warning condition was wrong.
* parse.y (warning_unless_e_option): ditto.
* enum.c (enum_all): new method 'all?', which returns true if
block returns true for all elements.
* enum.c (enum_any): new method 'any?', which returns true if
block retruns true for any of elements.
* marshal.c (marshal_load): do not give warning unless explicitly
set to verbose.
* eval.c (rb_exit): give string value "exit" to SystemExit.
* ruby.c (proc_options): -v should not print version if
proc_options called via moreswitches().
* parse.y (stmt): while/until modifier must work for empty body.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
which included commits to RCS files with non-trunk default branches.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e