summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-12 14:53:58 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-12 14:53:58 +0000
commit9ea87e2ca4be9fccbbaa79ce0bf20f7deb3177df (patch)
tree402f633c983eb7d992c682c96a9f03bce4facf4b /pack.c
parent5cb3b9c22d21157fbd762e39def74c3f1e1e7dbe (diff)
merges r20581 from trunk into ruby_1_9_1.
* pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'. just ignores '*' in these cases. [ruby-dev:37289] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pack.c b/pack.c
index 3f20d53c58..8c02f62563 100644
--- a/pack.c
+++ b/pack.c
@@ -491,7 +491,9 @@ pack_pack(VALUE ary, VALUE fmt)
}
}
if (*p == '*') { /* set data length */
- len = strchr("@Xxu", type) ? 0 : items;
+ len = strchr("@Xxu", type) ? 0
+ : strchr("PMm", type) ? 1
+ : items;
p++;
}
else if (ISDIGIT(*p)) {