diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-09-01 16:58:04 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-09-01 16:58:04 +0900 |
| commit | 7c49d56ce679d658f9a279e7975208ef6576e57f (patch) | |
| tree | dbc4b1d83cb59ccb98e9a7ac592a8603634d9bda /mrblib | |
| parent | 7ac68809d368c9008ceaac2a00ba83d5ea09690d (diff) | |
| download | mruby-7c49d56ce679d658f9a279e7975208ef6576e57f.tar.gz mruby-7c49d56ce679d658f9a279e7975208ef6576e57f.zip | |
attr_reader and attr_writer should return nil
Diffstat (limited to 'mrblib')
| -rw-r--r-- | mrblib/class.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mrblib/class.rb b/mrblib/class.rb index ebfb1f76d..ebb44ca4c 100644 --- a/mrblib/class.rb +++ b/mrblib/class.rb @@ -8,6 +8,7 @@ class Module attr_name = '@'+name define_method(name){self.instance_variable_get(attr_name)} end + nil end # 15.2.2.4.14 def attr_writer(*names) @@ -19,6 +20,7 @@ class Module name = (name+"=").intern define_method(name){|v|self.instance_variable_set(attr_name,v)} end + nil end # 15.2.2.4.12 def attr_accessor(*names) |
