diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-05 20:03:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-05 20:03:28 +0000 |
commit | 697a45b196c606147997372c20d14c6b2eccdda4 (patch) | |
tree | 48a14a6bc772db3577eb20287967b22901c06754 /dln.c | |
parent | c9ed212b9e74f71fb3137c72c80e37088de59c95 (diff) |
* dln.c (init_funcname_len): ignore rest from first dot.
[ruby-dev:41774]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r-- | dln.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -126,12 +126,12 @@ init_funcname_len(const char **file) /* Load the file as an object one */ for (base = p; *p; p++) { /* Find position of last '/' */ - if (*p == '.') dot = p; - if (isdirsep(*p)) base = p+1; + if (*p == '.' && !dot) dot = p; + if (isdirsep(*p)) base = p+1, dot = NULL; } *file = base; /* Delete suffix if it exists */ - return (dot && dot > base ? dot : p) - base; + return (dot ? dot : p) - base; } static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX; |