Exemplo n.º 1
0
 @Specialization
 public RubyString reverse(RubyString string) {
   string.set(new StringBuilder(string.toString()).reverse().toString());
   return string;
 }
Exemplo n.º 2
0
 @Specialization
 public RubyString downcase(RubyString string) {
   string.set(string.toString().toLowerCase());
   return string;
 }
Exemplo n.º 3
0
 @Specialization
 public RubyString initialize(RubyString self, RubyString from) {
   self.set(from);
   return self;
 }
Exemplo n.º 4
0
 @Specialization
 public RubyString chompBang(RubyString string) {
   string.set(string.toString().trim());
   return string;
 }