mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* variable.c (rb_mod_name): returns nil for anonymous modules.
[ruby-talk:198440] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cb6f1b4f2e
commit
4024730959
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Jun 22 11:47:52 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* variable.c (rb_mod_name): returns nil for anonymous modules.
|
||||||
|
[ruby-talk:198440]
|
||||||
|
|
||||||
Thu Jun 22 10:31:39 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Jun 22 10:31:39 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* string.c (rb_str_aref): "abc"[3] should not return an empty
|
* string.c (rb_str_aref): "abc"[3] should not return an empty
|
||||||
|
|
|
@ -163,7 +163,7 @@ classname(VALUE klass)
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* mod.name => string
|
* mod.name => string
|
||||||
*
|
*
|
||||||
* Returns the name of the module <i>mod</i>.
|
* Returns the name of the module <i>mod</i>. Returns nil for anonymous modules.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
|
@ -172,7 +172,7 @@ rb_mod_name(VALUE mod)
|
||||||
VALUE path = classname(mod);
|
VALUE path = classname(mod);
|
||||||
|
|
||||||
if (!NIL_P(path)) return rb_str_dup(path);
|
if (!NIL_P(path)) return rb_str_dup(path);
|
||||||
return rb_str_new(0,0);
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
|
|
Loading…
Reference in a new issue