Skip to content

Commit

Permalink
[Truffle] Real implementation of String#empty?.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Feb 10, 2015
1 parent ad4a92e commit d0cc57c
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -768,9 +768,7 @@ public EmptyNode(EmptyNode prev) {

@Specialization
public boolean empty(RubyString string) {
notDesignedForCompilation();

return string.toString().isEmpty();
return string.getBytes().length() == 0;
}
}

Expand Down

0 comments on commit d0cc57c

Please sign in to comment.