From: matz@... (Yukihiro Matsumoto) Date: 2002-08-01T10:45:25+09:00 Subject: Re: Segmentation Fault - Ruby Garbage Collection Hi, In message "Re: Segmentation Fault - Ruby Garbage Collection" on 02/08/01, William Djaja Tjokroaminata writes: |I am just curious. For the attribute, we have only a single function, |"rb_define_attr (variable, name, read, write)", and we can control |accessability using the read and write arguments. Why for global |variables we have three functions with unsimilar names? | | rb_define_variable - read and write | rb_define_readonly_variable - read only | rb_global_variable - no read and no write | |Isn't it cleaner if we also have only a single function such as |"rb_define_variable (name, value, read, write)"? I could read your mind. So I prepared you rb_define_hooked_variable(name, var, read, write) But still, rb_global_variable is a different beast. Unlike others, its "variable" means "C variables", which is not seen from Ruby. matz.