Skip to content

Commit 5d3797e

Browse files
committed
'str.__str__' should always return an object with builtin class 'str'.
1 parent 4a215d6 commit 5d3797e

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str/StringBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected List<com.oracle.truffle.api.dsl.NodeFactory<? extends PythonBuiltinBas
111111
public abstract static class StrNode extends PythonUnaryBuiltinNode {
112112
@Specialization
113113
public Object str(PString self) {
114-
return self;
114+
return self.getValue();
115115
}
116116

117117
@Specialization

0 commit comments

Comments
 (0)