Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 2ea4c02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion spec/tags/core/string/multiply_tags.txt
@@ -1,2 +1 @@
fails:String#* returns subclass instances
fails:String#* always taints the result when self is tainted
4 changes: 3 additions & 1 deletion topaz/objects/stringobject.py
Expand Up @@ -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")
Expand Down

0 comments on commit 2ea4c02

Please sign in to comment.