Граф коммитов

15 Коммитов

Автор SHA1 Сообщение Дата
matz 405a50a594 * eval.c (proc_invoke): prepare to pass a block from "call" method
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@7446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-03 04:56:25 +00:00
matz 5847fadf7b * io.c (rb_file_initialize): [ruby-dev:25032]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-02 15:17:35 +00:00
matz c0acb3ce17 * io.c (rb_io_sysread): use temporary lock. [ruby-dev:24992]
* lib/ostruct.rb (OpenStruct::method_missing): check method
  duplication for -d.

* lib/ostruct.rb (OpenStruct::initialize): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 15:58:18 +00:00
matz 018837b84f * node.h (NODE_TYPESHIFT): allow 4 more bits for line numbers.
[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: svn+ssh://ci.ruby-lang.org/ruby/trunk@7121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27 09:29:26 +00:00
matz 919f456de8 * exception message clean-up by Ian Macdonald <ian@caliban.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-29 07:54:38 +00:00
nobu 33e064afff * lib/ostruct.rb (OpenStruct#initialize_copy): should not share
members.  [ruby-dev:22966]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-20 10:11:25 +00:00
gsinclair 0425463a3d * lib/ostruct.rb: documented
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-19 13:42:30 +00:00
ntalbott fb1f07049f * lib/ostruct.rb: Added OpenStruct#==.
* test/ostruct/test_ostruct.rb: Added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-25 00:03:11 +00:00
matz 1cece7f80f * lib/ostruct.rb (OpenStruct::method_missing): prohibit modifying
frozen OpenStruct. [ruby-talk:80214]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-26 14:54:51 +00:00
nobu c52339881c * instruby.rb: not rewrite installed scripts when dry-run mode.
* lib/ostruct.rb (OpenStruct::initialize): should symbolize keys
  instead of values.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 20:09:46 +00:00
nahi 8a442aa52a * ostruct.rb: keep NoMethodError message with Ruby itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-15 16:12:43 +00:00
nahi c0e98a1384 * observer.rb: raise NoMethodError instead of NameError. [ruby-dev:18788]
* ostruct.rb: ditto.  fix a bug in inspect which called String#+ with
  Symbol.  [ruby-dev:18788]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-14 22:46:00 +00:00
matz aae36756dc * object.c (Init_Object): added Object#object_id, new name for
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@3020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-03 11:04:35 +00:00
nobu 29cef5f795 use Object#class instead of deprecated Object#type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 16:45:35 +00:00
matz 62e41d3f2e Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1998-01-16 12:19:09 +00:00