diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-22 02:49:28 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-22 02:49:28 +0000 |
| commit | 751ab6c6ed529c8624fe2a4123e5995cff96c61e (patch) | |
| tree | 5743e29462608c8f6f0a4cee101278a55cc7f9ba /variable.c | |
| parent | 9c7d37befb990bce29b786392b77b019f0fc3eb3 (diff) | |
| download | ruby-751ab6c6ed529c8624fe2a4123e5995cff96c61e.tar.gz ruby-751ab6c6ed529c8624fe2a4123e5995cff96c61e.tar.xz ruby-751ab6c6ed529c8624fe2a4123e5995cff96c61e.zip | |
* variable.c (rb_mod_name): returns nil for anonymous modules.
[ruby-talk:198440]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
| -rw-r--r-- | variable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/variable.c b/variable.c index 50f3e092f..95f4743e3 100644 --- a/variable.c +++ b/variable.c @@ -163,7 +163,7 @@ classname(VALUE klass) * call-seq: * 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 @@ -172,7 +172,7 @@ rb_mod_name(VALUE mod) VALUE path = classname(mod); if (!NIL_P(path)) return rb_str_dup(path); - return rb_str_new(0,0); + return path; } VALUE |
