summaryrefslogtreecommitdiffstats
path: root/lib/ostruct.rb
Commit message (Collapse)AuthorAgeFilesLines
* * lib/ostruct.rb (OpenStruct#inspect): fixed the recursion check.yugui2009-01-131-13/+11
| | | | | | | | | Patch by Kornelius Kalnbach. [ruby-core:20992]. * test/ostruct/test_ostruct.rb: test for inspect. Patch by Kornelius Kalnbach. [ruby-core:20992]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb (new_ostruct_member): Object#send no longer callnobu2005-09-121-3/+4
| | | | | | | | | | | | | private methods. [ruby-dev:27044] * test/rss/test_dublincore.rb, test/rss/test_trackback.rb, test/ruby/test_eval.rb, test/socket/test_socket.rb: ditto. * test/ruby/test_lambda (test_call_with_block): lambda makes new scope for formal block parameter. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: a patch from Florian Gross <florgro@gmail.com>matz2005-09-051-11/+30
| | | | | | | | | | | | | | | merged to allow recursive inspect (and to_s) for OpenStruct. [ruby-core:05532] * lib/observer.rb: a patch from nornagon <nornagon@gmail.com> merged to allow arbitrary names for update methods. [ruby-core:05416] * eval.c (rb_f_fcall): new method to avoid inefficiency of obj.instance_eval{send(...)} tricks. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_invoke): prepare to pass a block from "call" methodmatz2004-12-031-10/+6
| | | | | | | | | | | | | | | to a Proc generated by Method#to_proc. [ruby-dev:25031] * eval.c (rb_yield_0): actually passes a block given to "call". * object.c (convert_type): use rb_respond_to() again. this fix is based on [ruby-dev:25021] * eval.c (rb_respond_to): funcall respond_to? if it's redefined. [ruby-dev:25021] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_file_initialize): [ruby-dev:25032]matz2004-12-021-6/+23
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_sysread): use temporary lock. [ruby-dev:24992]matz2004-11-291-8/+6
| | | | | | | | | | * lib/ostruct.rb (OpenStruct::method_missing): check method duplication for -d. * lib/ostruct.rb (OpenStruct::initialize): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h (NODE_TYPESHIFT): allow 4 more bits for line numbers.matz2004-10-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | [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: http://svn.ruby-lang.org/repos/ruby/trunk@7121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * exception message clean-up by Ian Macdonald <ian@caliban.org>.matz2004-03-291-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb (OpenStruct#initialize_copy): should not sharenobu2004-02-201-0/+6
| | | | | | | members. [ruby-dev:22966] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: documentedgsinclair2004-02-191-11/+54
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: Added OpenStruct#==.ntalbott2003-09-251-0/+8
| | | | | | | * test/ostruct/test_ostruct.rb: Added. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb (OpenStruct::method_missing): prohibit modifyingmatz2003-08-261-0/+3
| | | | | | | frozen OpenStruct. [ruby-talk:80214] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * instruby.rb: not rewrite installed scripts when dry-run mode.nobu2002-11-181-8/+4
| | | | | | | | * lib/ostruct.rb (OpenStruct::initialize): should symbolize keys instead of values. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ostruct.rb: keep NoMethodError message with Ruby itself.nahi2002-11-151-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * observer.rb: raise NoMethodError instead of NameError. [ruby-dev:18788]nahi2002-11-141-2/+2
| | | | | | | | * ostruct.rb: ditto. fix a bug in inspect which called String#+ with Symbol. [ruby-dev:18788] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (Init_Object): added Object#object_id, new name formatz2002-11-031-8/+5
| | | | | | | | | | | | | | | | | | | Object#id. [new] * object.c (rb_obj_id_obsolete): give warning for Object#id. * numeric.c (fix_intern): added Fixnum#to_sym. [new] * object.c (sym_to_sym): rename from Symbol#intern * enum.c (enum_zip): added Enumerable#zip. [new] * array.c (rb_ary_zip): added Array#zip. * error.c (init_syserr): remove sys_nerr dependency. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use Object#class instead of deprecated Object#type.nobu2002-10-021-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial revisionmatz1998-01-161-0/+55
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8 b2dd03c8-39d4-4d8f-98ff-823fe69b080e