From 1338dcea730a2722cb8175baeb882ffcf3dfe7c2 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 8 Feb 2005 00:51:16 +0000 Subject: * lib/cgi.rb (CGI::Cookie): [ruby-talk:130040] * object.c: [ruby-doc:818] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- object.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 20f9148ca..e259d554d 100644 --- a/object.c +++ b/object.c @@ -2009,7 +2009,8 @@ rb_obj_ivar_get(obj, iv) * * Sets the instance variable names by symbol to * object, thereby frustrating the efforts of the class's - * author to attempt to provide proper encapsulation. + * author to attempt to provide proper encapsulation. The variable + * did not have to exist prior to this call. * * class Fred * def initialize(p1, p2) @@ -2018,7 +2019,8 @@ rb_obj_ivar_get(obj, iv) * end * fred = Fred.new('cat', 99) * fred.instance_variable_set(:@a, 'dog') #=> "dog" - * fred.inspect #=> "#" + * fred.instance_variable_set(:@c, 'cat') #=> "cat" + * fred.inspect #=> "#" */ static VALUE -- cgit