diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-10 08:07:56 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-10 08:07:56 +0000 |
commit | eb778a7b6bfb16f4dd5f1a682ff0dc3dcb31e0f3 (patch) | |
tree | 105794dfb03abf3b0b1407346e06a655548f2398 | |
parent | 2fc47aa06b99c529156f857f6669e3752f406015 (diff) |
* parse.y (parser_encode_length): fix typo: the length of
"-dos" and "-mac" is not 5 but 4.
patched by James M. Lawrence [ruby-core:35476] fixes #4489
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | parse.y | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Mar 10 16:00:22 2011 NARUSE, Yui <naruse@ruby-lang.org> + + * parse.y (parser_encode_length): fix typo: the length of + "-dos" and "-mac" is not 5 but 4. + patched by James M. Lawrence [ruby-core:35476] fixes #4489 Thu Mar 10 10:52:01 2011 NAKAMURA Usaku <usa@ruby-lang.org> * test/ruby/test_require.rb: setting too long string to ENV causes @@ -6230,7 +6230,7 @@ parser_encode_length(struct parser_params *parser, const char *name, long len) if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) return nlen; } - if (len > 4 && name[nlen = len - 5] == '-') { + if (len > 4 && name[nlen = len - 4] == '-') { if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) return nlen; if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0) |