summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-08 08:19:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-08 08:19:56 +0000
commite7f4d90930e4ad042fb8152fed1e2e490deb7a4f (patch)
tree4679007547ca772a9f5831560dbbc5d1061ec1bd
parent4e61f6d31d6adc76ce1694d921fa6201ae4e0046 (diff)
fix paren
* string.c (str_byte_substr): fix misplaced parenthesis at r56155. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 523d1e5ca7..e95ed2be69 100644
--- a/string.c
+++ b/string.c
@@ -5266,7 +5266,7 @@ str_byte_substr(VALUE str, long beg, long len, int empty)
else
p = s + beg;
- if (!STR_EMBEDDABLE_P(len, TERM_LEN(str) && SHARABLE_SUBSTRING_P(beg, len, n))) {
+ if (!STR_EMBEDDABLE_P(len, TERM_LEN(str)) && SHARABLE_SUBSTRING_P(beg, len, n)) {
str2 = rb_str_new_frozen(str);
str2 = str_new_shared(rb_obj_class(str2), str2);
RSTRING(str2)->as.heap.ptr += beg;