Bug #10845

Updated by mame (Yusuke Endoh) almost 4 years ago

If I make a subclass of `String`, the method `*` returns an instance of that class. 

 class MyString < String 
 end"foo").*(2).class #=> MyString 

 This is different from other similar operations like `+` and `%`, which return a `String` instance. 

 ~~~ruby"foo").+("bar").class #=> String"%{foo}").%(foo:"%{foo}").+(foo: "bar").class #=> String 

 I don't see clear reason why `*` is to be different from `+` and `%`, and thought that perhaps either the behaviour with `*` is a bug, or the behaviour with `+` and `%` is a bug. 

 Or, is a reason why they are different?