From c09cea5e1ba4e6d103fad9e6c6cbf29560abf78b Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 20 Jul 2006 17:36:36 +0000 Subject: * object.c (rb_mod_attr): make Module#attr to be an alias to attr_reader. [RCR#331] * ruby.h: export classes/modules to implement sandbox. [ruby-core:08283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/complex.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/complex.rb') diff --git a/lib/complex.rb b/lib/complex.rb index 8832f17f82..516bbbfd89 100644 --- a/lib/complex.rb +++ b/lib/complex.rb @@ -400,10 +400,10 @@ class Complex < Numeric I = Complex(0,1) # The real part of a complex number. - attr :real + attr_reader :real # The imaginary part of a complex number. - attr :image + attr_reader :image alias imag image end -- cgit v1.2.3