We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02e8566 commit cef3963Copy full SHA for cef3963
src/PyBytesProxyHandler.cc
@@ -43,7 +43,8 @@ static bool array_valueOf(JSContext *cx, unsigned argc, JS::Value *vp) {
43
if (index > 0) {
44
valueOfString += ",";
45
}
46
- valueOfString += data[index];
+
47
+ valueOfString += std::to_string(data[index]);
48
49
50
args.rval().setString(JS_NewStringCopyZ(cx, valueOfString.c_str()));
tests/python/test_buffer_typed_array.py
@@ -259,19 +259,19 @@ def test_constructor_creates_typedarray():
259
260
def test_bytes_valueOf():
261
a = pm.eval('(bytes) => bytes.valueOf()')(bytes("hello world", "ascii"))
262
- assert a == "h,e,l,l,o, ,w,o,r,l,d"
+ assert a == "104,101,108,108,111,32,119,111,114,108,100"
263
264
265
def test_bytes_toString():
266
a = pm.eval('(bytes) => bytes.toString()')(bytes("hello world", "ascii"))
267
268
269
270
def test_bytes_console():
271
temp_out = StringIO()
272
sys.stdout = temp_out
273
pm.eval('console.log')(bytes("hello world", "ascii"))
274
- assert temp_out.getvalue().startswith("{ [String: 'h,e,l,l,o, ,w,o,r,l,d']")
+ assert temp_out.getvalue().startswith("\x1b[32m[String: '104,101,108,108,111,32,119,111,114,108,100'")
275
276
277
# iterator symbol property
0 commit comments