Skip to content
Permalink
Browse files

Merge pull request #761 from kachick/string-multiply-infects

String#* should infect
  • Loading branch information
alex committed Jun 24, 2013
2 parents 7c9a9a6 + cb7703f commit 2ea4c02d7f1d5525e95134193eceb82bb99100c4
Showing with 3 additions and 2 deletions.
  1. +0 −1 spec/tags/core/string/multiply_tags.txt
  2. +3 −1 topaz/objects/stringobject.py
@@ -1,2 +1 @@
fails:String#* returns subclass instances
fails:String#* always taints the result when self is tainted
@@ -475,7 +475,9 @@ def method_plus(self, space, w_obj):
def method_times(self, space, times):
if times < 0:
raise space.error(space.w_ArgumentError, "negative argument")
return self.strategy.mul(space, self.str_storage, times)
res = self.strategy.mul(space, self.str_storage, times)
space.infect(res, self)
return res

@classdef.method("<<")
@classdef.method("concat")

0 comments on commit 2ea4c02

Please sign in to comment.
You can’t perform that action at this time.