summaryrefslogtreecommitdiff
path: root/lib/delegate.rb
AgeCommit message (Collapse)Author
2010-02-06* lib/delegate.rb (Delegator#method_missing),nobu
(Delegator.delegating_block): don't hide backtrace from __getobj__ and reduced exception messages when $DEBUG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-05* lib/delegate.rb (Delegator): include copy of Kernel.nobu
[ruby-dev:40314] * lib/delegate.rb (Delegator#{dup,clone}): class of copy should be Delegator. [ruby-dev:40313] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-03* lib/delegate.rb (Delegator): now inherits BasicObject.nobu
[ruby-dev:39154], [Bug #2679], [ruby-dev:40242] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-02* lib/delegate.rb (Delegator#marshal_dump): excludenobu
delegator-specific instance variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-28* lib/delegate.rb (Delegator#initialize_copy): use initialize_copymatz
instead of overriding clone/dup. [ruby-dev:40221] it now always clones the target, it might cause incompatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-29* lib/delegate.rb (marshal_dump/load): Provide forward compatibility ↵marcandre
[ruby-core:24211] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-24* lib/delegate.rb (marshal_dump/load): dump & load instance variables by ↵marcandre
default [ruby-core:24211] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-24* object.c (rb_obj_cmp): defines Object#<=>. [ruby-core:24063]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-17* vm_method.c (basic_obj_respond_to): call #respond_to_missing?matz
always with two arguments. [ruby-core:26090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-17* lib/delegate.rb (Delegator#respond_to_missing): warn only whenmatz
specified method is a private. [ruby-dev:39498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16* lib/delegate: rdoc typomarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16* lib/delegate.rb (Delegator#method_missing): remove backtracematz
lines _until_ `method_missing'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16* lib/delegate.rb (Delegator#freeze): #freeze should freeze selfmatz
and the target at once. [ruby-core:26118] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16* lib/delegate.rb (Delegator#respond_to_missing): warn if optionalmatz
include_private argument is not false. Delegator does (and should) not forward private methods. [ruby-core:26080] * lib/delegate.rb (Delegator#respond_to_missing): instead of redefining #respond_to?, use #respond_to_missing?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-06* lib/delegate.rb (Delegator::public_api): take snapshot ofmatz
public method at the beginning time. * lib/delegate.rb (SimpleDelegator#initialize): use Delegator.public_api since public_method might be added after initialization. [ruby-dev:39383] * lib/delegate.rb (DelegateClass): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-13* lib/delegate.rb (Delegator#method_missing): __FILE__ may containmatz
multi-byte characters. a patch from Kenta Murata in [ruby-dev:39066]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-10* lib/delegate.rb (Delegator.delegating_block): should not refermatz
DelegateClass specific @delegate_dc_obj. a patch from Erik Hollensbe in [ruby-core:19671]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-15* lib/delegate.rb (DelegateClass): restored 1.8 behavior formatz
DelegateClass as well. [ruby-dev:36739] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14* lib/delegate.rb (Delegator): simplified and restored 1.8matz
behavior. [ruby-dev:35986] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04* lib/rdoc.rb: massive spelling correction patch from Evan Farrarmatz
<evanfarrar at gmail.com> in [ruby-doc:1382] applied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-02* lib/delegate.rb (Delegator::MethodDelegation#respond_to):knu
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
2008-02-04* lib/delegate.rb (DelegateClass): use define_method instead ofnobu
module_eval to improve performance. [ruby-dev:33586] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-04 * lib/delegate.rb (Delegator.preserved, DelegateClass.methods): extendusa
shouldn't be delegated. [ruby-dev:32987], etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-04* eval.c (Init_eval): move instance_eval and instance_exec tomatz
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
2007-12-10* eval.c (rb_f_public_send): rename invoke_method to public_send.matz
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
2007-11-04* eval.c (rb_f_send): allow send/__send__ to call methods of allmatz
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
2007-08-26* io.c (rb_io_each_byte): caused infinite loop. [ruby-dev:31652]matz
* 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
2007-08-24* eval.c (rb_f_send_bang): abandon the name funcall for privatematz
aware method call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-14* lib/delegate.rb: catch up with class local variable (@_v) spec.ko1
* lib/singleton.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-07* lib/weakref.rb (WeakRef::__setobj__): should supportmatz
marshaling. [ruby-talk:228508] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-20* string.c (sym_eql): fail early to gain performance.matz
* 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
2006-07-26* eval.c (Init_eval): rename #invoke_method andmatz
#invoke_functional_method to __send and __send! respectively. * eval.c (remove_method): prohibit removing __send and __send!. * eval.c (rb_undef): prohibit undef'ing __send and __send!. * eval.c (rb_eval): prohibit redefining __send and __send!. * lib/delegate.rb (Delegator): preserve __send. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-20* lib/delegate.rb (Delegator): should not delegate "funcall".matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-29* eval.c (rb_mod_define_method): should save safe_level in thematz
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
2005-10-05* range.c (rb_range_beg_len): should return Qfalse for non-rangematz
object. * pack.c (EXTEND16): [ruby-dev:27383] * eval.c (set_trace_func): add rb_secure(4) to prevent adding tracing function. * lib/delegate.rb: document update from James Edward Gray II <james@grayproductions.net>. [ruby-core:05942] * process.c (proc_daemon): should restrict execution on levels higher than $SAFE=2. suggested by URABE Shyouhei <shyouhei@ice.uec.ac.jp>. * lib/forwardable.rb: replaced by new implementation from <Daniel.Berger@qwest.com>. [ruby-core:05899] * file.c (path_check_0): disallow sticky world writable directory in PATH (and $LOAD_PATH). [ruby-dev:27226] * numeric.c (fix_idiv): 1.div(1.0) should return integer value. [ruby-dev:27235] * lib/yaml.rb: require 'yaml/constants'. [ruby-core:5776] * lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset information to content-type header.[ruby-core:5127] * lib/xmlrpc/server.rb (CGIServer::serve): ditto. * lib/xmlrpc/server.rb (ModRubyServer::serve): ditto. * lib/xmlrpc/server.rb (WEBrickServlet::service): ditto. * test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove test_s_open_error test to detect duplicate open. [ruby-dev:27202] * eval.c (splat_value): use to_a to splat non Array object. * object.c (nil_to_a): remove nil.to_a. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-12* numeric.c (fix_equal, fix_cmp, fix_gt, fix_ge, fix_lt, fix_le):matz
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
2005-06-30* lib/delegate.rb (Delegator::respond_to): respond_to? must checkmatz
destination object. [ruby-talk:146894] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-30* eval.c (rb_eval): pre-evaluate argument for unambiguousmatz
evaluation order. [ruby-dev:26383] * lib/delegate.rb (Delegator::method_missing): forward unknown method to the destination. suggested by <christophe.poucet@gmail.com>. [ruby-talk:146776] * process.c (detach_process_watcher): terminate process watcher thread right after rb_waitpid() succeed. [ruby-talk:146430] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-12* signal.c (sigexit): call rb_thread_signal_exit() instead ofmatz
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
2005-05-12reverted (commit miss) [ruby-dev:26141]ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-11* eval.c (break_jump): break should not cross functions.matz
[ruby-list:40818] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-10* lib/delegate.rb (SimpleDelegator::dup): wrong number ofmatz
arguments. * lib/delegate.rb (DelegateClass::dup): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19* array.c (rb_ary_times): Array#* should return an instance ofmatz
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
2004-10-19* io.c (read_all): block string buffer modification duringmatz
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
2004-09-21* enum.c (enum_sort_by): do not use qsort directly. usematz
rb_ary_sort_bang() instead. [ruby-dev:24291] * enum.c (enum_sort_by): pedantic type check added. [ruby-dev:24291] * hash.c (rb_hash_foreach_iter): check iter_lev after each iteration. [ruby-dev:24289] * array.c (rb_ary_and): element size might change during comparison. [ruby-dev:24290] * array.c (rb_ary_or): ditto. [ruby-dev:24292] * array.c (rb_ary_equal): wrong fix. [ruby-dev:24286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07* parse.y (string_content): turn off NODE_NEWLINE flag to avoidmatz
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
2004-03-31* lib/delegate.rb (DelegateClass): define internal methods of thenobu
result class, but not metaclass of the caller. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-29* exception message clean-up by Ian Macdonald <ian@caliban.org>.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-27* misc/ruby-mode.el: better support for general delimitedmatz
strings. [ruby-dev:22695] * lib/weakref.rb (WeakRef::initialize): set up @__id before calling "super". * lib/delegate.rb (Delegator::initialize): preserve singleton_method_added method [ruby-dev:22685] * lib/delegate.rb (Delegator::initialize): use Kernel::raise instead of mere raise. [ruby-dev:22681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e