summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-16 19:02:38 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-16 19:02:38 +0000
commit1fc214c04dde17a23191aeb35ec613ec31cbf4b9 (patch)
tree6d7578dc0073e0a8aad9b55a0dcbf82bd6ad0e8c /load.c
parentfc7711ff17cde31aec0e2c1d29faca264b49da6b (diff)
* load.c (loaded_feature_path): stop returning false negatives for
filenames which are trailing substrings of file extensions. For example, 'b', which a trailing substring of ".rb" should not return false. [Bug #11155][ruby-core:69206] * test/ruby/test_autoload.rb: test for fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r--load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/load.c b/load.c
index 39315df..f4f7808 100644
--- a/load.c
+++ b/load.c
@@ -317,7 +317,7 @@ loaded_feature_path(const char *name, long vlen, const char *feature, long len,
const char *e;
if (vlen < len+1) return 0;
- if (!strncmp(name+(vlen-len), feature, len)) {
+ if (strchr(feature, '.') && !strncmp(name+(vlen-len), feature, len)) {
plen = vlen - len;
}
else {