Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
substr-rw should tolerate assignment of non-Str.
Fixes RT #125402.
  • Loading branch information
jnthn committed Jun 23, 2015
1 parent d078782 commit c81fdcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Str.pm
Expand Up @@ -1814,7 +1814,7 @@ sub substr-rw(\what, \start, $want?) is rw {
nqp::concat(
nqp::substr($str,0,nqp::unbox_i($from)),
nqp::concat(
nqp::unbox_s($new),
nqp::unbox_s(nqp::istype($new, Str) ?? $new !! $new.Str),
nqp::substr($str,nqp::unbox_i($from + $chars))
)
)
Expand Down

0 comments on commit c81fdcb

Please sign in to comment.