Skip to content

Commit 2923089

Browse files
authored
Merge pull request #8 from msgpack/develop
MpDecoder now assumes strings are UTF-8 encoded by default.
2 parents 250fd25 + 8aaa016 commit 2923089

File tree

25 files changed

+55
-25
lines changed

25 files changed

+55
-25
lines changed

repository/ConfigurationOfMessagePack.package/ConfigurationOfMessagePack.class/class/catalogChangeLog.st

+4
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ catalogChangeLog
1414
[[[
1515
(ConfigurationOfMessagePack project version: ''1.2.3'') load
1616
]]]
17+
- Version 1.2.4
18+
[[[
19+
(ConfigurationOfMessagePack project version: ''1.2.4'') load
20+
]]]
1721
'

repository/ConfigurationOfMessagePack.package/ConfigurationOfMessagePack.class/instance/development..st

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ symbolic versions
22
development: spec
33
<symbolicVersion: #'development'>
44

5-
spec for: #'common' version: '1.2.3'.
5+
spec for: #'common' version: '1.2.4'.

repository/ConfigurationOfMessagePack.package/ConfigurationOfMessagePack.class/instance/stable..st

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ symbolic versions
22
stable: spec
33
<symbolicVersion: #stable>
44

5-
spec for: #'common' version: '1.2.3'.
5+
spec for: #'common' version: '1.2.4'.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
versions
2+
version124: spec
3+
<version: '1.2.4' imports: #('1.2.0-baseline') >
4+
5+
spec for: #common do: [
6+
spec blessing: #development.
7+
spec author: 'Masashi Umezawa'.
8+
spec
9+
package: 'MessagePack-Core' with: 'MessagePack-Core-MasashiUmezawa.36';
10+
package: 'MessagePackTest' with: 'MessagePackTest-MasashiUmezawa.14' ].
11+
spec for: #squeakCommon do: [
12+
spec
13+
package: 'MessagePack-Squeak-Core' with: 'MessagePack-Squeak-Core-MasashiUmezawa.7'].

repository/ConfigurationOfMessagePack.package/ConfigurationOfMessagePack.class/methodProperties.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"class" : {
33
"bootstrapPackage:from:" : "mu 6/2/2011 15:05",
4-
"catalogChangeLog" : "MasashiUmezawa 6/4/2016 14:26",
4+
"catalogChangeLog" : "MasashiUmezawa 11/12/2016 23:31",
55
"catalogDescription" : "MasashiUmezawa 1/3/2016 13:00",
66
"catalogKeyClassesAndExample" : "MasashiUmezawa 1/3/2016 13:02",
77
"catalogKeywords" : "MasashiUmezawa 1/3/2016 13:03",
@@ -20,9 +20,9 @@
2020
"baseline100:" : "MasashiUmezawa 6/27/2015 15:17",
2121
"baseline101:" : "dkh 8/26/2011 03:32",
2222
"baseline120:" : "mu 10/15/2013 00:46",
23-
"development:" : "MasashiUmezawa 6/4/2016 14:29",
23+
"development:" : "MasashiUmezawa 11/12/2016 23:31",
2424
"project" : "mu 6/2/2011 15:05",
25-
"stable:" : "MasashiUmezawa 6/4/2016 14:29",
25+
"stable:" : "MasashiUmezawa 11/12/2016 23:31",
2626
"version100:" : "MasashiUmezawa 6/27/2015 15:15",
2727
"version101:" : "mu 11/23/2011 22:44",
2828
"version102:" : "mu 11/23/2011 22:44",
@@ -31,4 +31,5 @@
3131
"version120:" : "MasashiUmezawa 10/15/2013 01:09",
3232
"version121:" : "MasashiUmezawa 6/27/2015 15:14",
3333
"version122:" : "MU 12/19/2015 23:29",
34-
"version123:" : "MasashiUmezawa 6/4/2016 14:28" } }
34+
"version123:" : "MasashiUmezawa 6/4/2016 14:28",
35+
"version124:" : "MasashiUmezawa 11/13/2016 00:07" } }

repository/ConfigurationOfMessagePack.package/monticello.meta/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(name 'ConfigurationOfMessagePack-MasashiUmezawa.15' message 'Added version 1.2.3 description' id '936b7750-5fb4-5444-8cfd-e7432e9428ab' date '4 June 2016' time '2:31:00.743615 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.14' message 'Added catalog info' id '5277f5e5-8777-5940-b186-d7ffcd49a2af' date '3 January 2016' time '1:05:15.708623 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.13' message 'Stable version is set to 1.2.2' id '230be898-eb51-da41-b725-47ac066d10d3' date '3 January 2016' time '12:39:11.809623 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MU.12' message '- Added version 1.2.2 configuration.- 1.2.2 is the latest development version' id '98f7cbdf-e808-d24a-9ccf-c0f51af91146' date '19 December 2015' time '11:33:43.022 pm' author 'MU' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.11' message 'Fixed some validation errors' id '9c90c6e4-5bf0-456e-9533-fbab3071731e' date '27 June 2015' time '3:20:08.758362 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.10' message 'Added version 1.2.1 spec' id '6876af65-f092-4be5-959d-590593da4246' date '14 June 2015' time '11:35:30.409191 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.9' message 'Added version120' id 'ee574050-6c95-3245-8ba4-bc08d0988c47' date '15 October 2013' time '1:11:56.97 am' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-mu.8' message 'Added baseline120' id '8cd96180-b269-7b4f-85e6-bf51f30d07b8' date '15 October 2013' time '12:50:15.76 am' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.7' message 'Added config for 1.0.4' id '33f88b08-2d95-c542-9be2-8928b1b0b569' date '2 May 2012' time '1:03:06.151 pm' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.6' message 'version 1.0.3' id '6630ca6a-3817-eb45-8125-504dc91a9c3a' date '23 November 2011' time '11:02:08.711 pm' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-AlexandreBergel.5' message 'Dale fixed a number of errors in it' id '38f583fb-c3ca-43c2-a4ad-fafed0bfdbf3' date '29 August 2011' time '3:53:13 pm' author 'AlexandreBergel' ancestors ((name 'ConfigurationOfMessagePack-mu.4' message 'version 1.0.2 (bug fix of negative fix num)' id '64136094-779f-2b48-8b72-1dfbaaa928b1' date '16 July 2011' time '1:14:22.239 am' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.3' message 'version 1.0.1' id '631d161f-3466-8144-9eb4-77fbf7be6644' date '7 June 2011' time '9:29:42.702 pm' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.2' message 'Fixed version' id 'ae6267f7-d91c-454f-9b9f-199903c2592e' date '2 June 2011' time '5:48:45.344 pm' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.1' message 'Initial version: http://code.google.com/p/messagepack-st/' id 'e64620bc-880e-2e4e-9814-4c8bb9e6675f' date '2 June 2011' time '3:55:04.744 pm' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
1+
(name 'ConfigurationOfMessagePack-MasashiUmezawa.17' message 'Fixed MessagePackTest version' id 'e326c514-2014-4f41-b650-98c956d8f38b' date '13 November 2016' time '12:08:39.897191 am' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.16' message 'Added version 1.2.4 description' id '70af5567-66c7-844b-b599-c0f82e81fef3' date '12 November 2016' time '11:33:10.891191 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.15' message 'Added version 1.2.3 description' id '936b7750-5fb4-5444-8cfd-e7432e9428ab' date '4 June 2016' time '2:31:00.743615 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.14' message 'Added catalog info' id '5277f5e5-8777-5940-b186-d7ffcd49a2af' date '3 January 2016' time '1:05:15.708623 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.13' message 'Stable version is set to 1.2.2' id '230be898-eb51-da41-b725-47ac066d10d3' date '3 January 2016' time '12:39:11.809623 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MU.12' message '- Added version 1.2.2 configuration.- 1.2.2 is the latest development version' id '98f7cbdf-e808-d24a-9ccf-c0f51af91146' date '19 December 2015' time '11:33:43.022 pm' author 'MU' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.11' message 'Fixed some validation errors' id '9c90c6e4-5bf0-456e-9533-fbab3071731e' date '27 June 2015' time '3:20:08.758362 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.10' message 'Added version 1.2.1 spec' id '6876af65-f092-4be5-959d-590593da4246' date '14 June 2015' time '11:35:30.409191 pm' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-MasashiUmezawa.9' message 'Added version120' id 'ee574050-6c95-3245-8ba4-bc08d0988c47' date '15 October 2013' time '1:11:56.97 am' author 'MasashiUmezawa' ancestors ((name 'ConfigurationOfMessagePack-mu.8' message 'Added baseline120' id '8cd96180-b269-7b4f-85e6-bf51f30d07b8' date '15 October 2013' time '12:50:15.76 am' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.7' message 'Added config for 1.0.4' id '33f88b08-2d95-c542-9be2-8928b1b0b569' date '2 May 2012' time '1:03:06.151 pm' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.6' message 'version 1.0.3' id '6630ca6a-3817-eb45-8125-504dc91a9c3a' date '23 November 2011' time '11:02:08.711 pm' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-AlexandreBergel.5' message 'Dale fixed a number of errors in it' id '38f583fb-c3ca-43c2-a4ad-fafed0bfdbf3' date '29 August 2011' time '3:53:13 pm' author 'AlexandreBergel' ancestors ((name 'ConfigurationOfMessagePack-mu.4' message 'version 1.0.2 (bug fix of negative fix num)' id '64136094-779f-2b48-8b72-1dfbaaa928b1' date '16 July 2011' time '1:14:22.239 am' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.3' message 'version 1.0.1' id '631d161f-3466-8144-9eb4-77fbf7be6644' date '7 June 2011' time '9:29:42.702 pm' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.2' message 'Fixed version' id 'ae6267f7-d91c-454f-9b9f-199903c2592e' date '2 June 2011' time '5:48:45.344 pm' author 'mu' ancestors ((name 'ConfigurationOfMessagePack-mu.1' message 'Initial version: http://code.google.com/p/messagepack-st/' id 'e64620bc-880e-2e4e-9814-4c8bb9e6675f' date '2 June 2011' time '3:55:04.744 pm' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())

repository/MessagePack-Core.package/MpDecoder.class/instance/readFixString..st

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ reading-string
22
readFixString: firstByte
33
| size |
44
size := (firstByte bitAnd: 2r11111).
5-
^(self readStream next: size) asString
5+
^MpPortableUtil default stringFromBytes: (self readStream next: size)

repository/MessagePack-Core.package/MpDecoder.class/instance/readString16.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ reading-string
22
readString16
33
| size |
44
size := MpPortableUtil default readUint16From: self readStream.
5-
^(self readStream next: size) asString
5+
^MpPortableUtil default stringFromBytes: (self readStream next: size)

repository/MessagePack-Core.package/MpDecoder.class/instance/readString32.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ reading-string
22
readString32
33
| size |
44
size := MpPortableUtil default readUint32From: self readStream.
5-
^(self readStream next: size) asString
5+
^MpPortableUtil default stringFromBytes: (self readStream next: size)

repository/MessagePack-Core.package/MpDecoder.class/instance/readString8.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ reading-string
22
readString8
33
| size |
44
size := self readStream next.
5-
^(self readStream next: size) asString
5+
^MpPortableUtil default stringFromBytes: (self readStream next: size)

repository/MessagePack-Core.package/MpDecoder.class/methodProperties.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"readFixMap:" : "mu 6/7/2011 21:00",
3636
"readFixRaw:" : "MasashiUmezawa 2/2/2013 01:10",
3737
"readFixStr:" : "mu 8/25/2013 23:55",
38-
"readFixString:" : "MasashiUmezawa 2/2/2013 00:55",
38+
"readFixString:" : "MasashiUmezawa 11/12/2016 23:18",
3939
"readFixext1" : "mu 12/8/2013 15:41",
4040
"readFixext16" : "mu 11/5/2013 00:02",
4141
"readFixext2" : "mu 11/5/2013 00:02",
@@ -63,9 +63,9 @@
6363
"readStr8" : "mu 8/26/2013 00:04",
6464
"readStream" : "mu 4/29/2011 23:40",
6565
"readStream:" : "mu 4/29/2011 23:40",
66-
"readString16" : "mu 8/26/2013 00:05",
67-
"readString32" : "mu 8/26/2013 00:05",
68-
"readString8" : "mu 8/26/2013 00:06",
66+
"readString16" : "MasashiUmezawa 11/12/2016 23:18",
67+
"readString32" : "MasashiUmezawa 11/12/2016 23:18",
68+
"readString8" : "MasashiUmezawa 11/12/2016 23:18",
6969
"readTrue" : "mu 4/30/2011 23:16",
7070
"readType" : "mu 4/30/2011 23:33",
7171
"readUint16" : "mu 4/30/2011 23:31",

repository/MessagePack-Core.package/MpEncoder.class/methodProperties.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@
6868
"writeUint64:" : "mu 4/29/2011 15:49",
6969
"writeUint8:" : "mu 4/29/2011 15:38",
7070
"writeUnknown:withHandler:" : "MasashiUmezawa 2/2/2013 00:37",
71-
"writeWideString:" : "mu 8/19/2013 01:14" } }
71+
"writeWideString:" : "MasashiUmezawa 11/12/2016 23:00" } }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
actions
2+
stringFromBytes: aByteArray
3+
^aByteArray asString

repository/MessagePack-Core.package/MpPortableUtil.class/methodProperties.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"readUint32From:" : "mu 4/29/2011 15:08",
2020
"readUint64From:" : "mu 4/30/2011 23:35",
2121
"signalException:" : "mu 5/2/2011 13:53",
22+
"stringFromBytes:" : "MasashiUmezawa 11/12/2016 23:19",
2223
"useFastBulkWrite" : "mu 10/29/2011 23:23",
2324
"writeDouble:to:" : "mu 4/29/2011 16:16",
2425
"writeFloat:to:" : "mu 4/29/2011 16:16",

repository/MessagePack-Core.package/monticello.meta/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(name 'MessagePack-Core-MasashiUmezawa.35' message 'Added symbolAsString setting' id '42ae866c-30b7-1a45-a197-a005b7e5fa90' date '4 June 2016' time '2:22:42.063615 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Core-MasashiUmezawa.34' message 'MpSettings>>formatVersion -> 2013 is now default' id '51579c03-5587-47f1-9ebf-8a5ef7470230' date '21 June 2015' time '4:34:16.532914 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Core-MasashiUmezawa.33' message 'Fixed a mapping bug in MpDecodeTypeMapper>>bytesAsString' id 'd6135ce8-d710-444d-b3b0-2a6c24168765' date '23 May 2015' time '11:36:39.85456 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Core-MasashiUmezawa.32' message 'Renamed MpConstants typecode methods for compatibility with GemStone.https://github.com/msgpack/msgpack-smalltalk/issues/4' id '7672363c-2b3d-422c-a18d-63de7ceb21ba' date '18 May 2015' time '10:54:43.647181 am' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Core-mu.31' message '- Ext and Fixext encoding/decoding are now working' id '958b6113-8b9b-214c-a28e-38c991a8b70b' date '8 December 2013' time '3:47:05.753 pm' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
1+
(name 'MessagePack-Core-MasashiUmezawa.36' message 'MpDecoder now assumes strings are utf8 encoded' id 'eed3c7c0-24a6-cf46-9bba-1dd6b7bf4e83' date '12 November 2016' time '11:26:28.400191 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Core-MasashiUmezawa.35' message 'Added symbolAsString setting' id '42ae866c-30b7-1a45-a197-a005b7e5fa90' date '4 June 2016' time '2:22:42.063615 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Core-MasashiUmezawa.34' message 'MpSettings>>formatVersion -> 2013 is now default' id '51579c03-5587-47f1-9ebf-8a5ef7470230' date '21 June 2015' time '4:34:16.532914 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Core-MasashiUmezawa.33' message 'Fixed a mapping bug in MpDecodeTypeMapper>>bytesAsString' id 'd6135ce8-d710-444d-b3b0-2a6c24168765' date '23 May 2015' time '11:36:39.85456 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Core-MasashiUmezawa.32' message 'Renamed MpConstants typecode methods for compatibility with GemStone.https://github.com/msgpack/msgpack-smalltalk/issues/4' id '7672363c-2b3d-422c-a18d-63de7ceb21ba' date '18 May 2015' time '10:54:43.647181 am' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Core-mu.31' message '- Ext and Fixext encoding/decoding are now working' id '958b6113-8b9b-214c-a28e-38c991a8b70b' date '8 December 2013' time '3:47:05.753 pm' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
actions
2+
stringFromBytes: aByteArray
3+
^aByteArray asString convertFromEncoding: #utf8

repository/MessagePack-Squeak-Core.package/MpSqPortableUtil.class/methodProperties.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"readUint16From:" : "mu 4/29/2011 15:41",
1313
"readUint32From:" : "mu 4/29/2011 15:41",
1414
"readUint64From:" : "mu 4/29/2011 15:41",
15+
"stringFromBytes:" : "MasashiUmezawa 11/12/2016 23:27",
1516
"writeDouble:to:" : "mu 5/1/2011 15:53",
1617
"writeFloat:to:" : "mu 5/1/2011 15:23",
1718
"writeInt16:to:" : "mu 4/29/2011 15:51",

repository/MessagePack-Squeak-Core.package/monticello.meta/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(name 'MessagePack-Squeak-Core-MasashiUmezawa.6' message 'Added #symbolAsString/symbolAsError for changing Symbol encoding behavior' id 'b0371b80-07e7-8d4c-88db-748d7a17ce1f' date '4 June 2016' time '2:26:03.490615 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Squeak-Core-MU.5' message '- Fixed MpSqEncodeTypeMapper class>>defineDoubleActionTo:- BoxedFloat64 and SmallFloat64 encode mappings were added for Spur VM.' id 'bdd0165b-4dc7-444a-a30c-98087488bede' date '19 December 2015' time '11:25:14.479 pm' author 'MU' ancestors ((name 'MessagePack-Squeak-Core-mu.4' message '- Adding encoder support for new specification (https://github.com/msgpack/msgpack/blob/master/spec.md).- MpSettings >> formatVersion will be used for switching new/old formats' id 'b611d926-78c1-d044-a2dd-7b61d7b780a2' date '19 August 2013' time '1:38:43.346 am' author 'mu' ancestors ((name 'MessagePack-Squeak-Core-mu.3' message 'Added #stringAsBytes setting. If true, String will be enceded as MessagePack raw bytes.' id '8a797bfd-5150-4e42-8655-7db9019c69f1' date '2 May 2012' time '12:59:10.973 pm' author 'mu' ancestors ((name 'MessagePack-Squeak-Core-mu.2' message 'Added MpMemoryWriteStream for bulk write performance tuning' id '42d08a68-5df4-2b4f-98d8-4b26e4b58470' date '23 October 2011' time '12:06:45.085 am' author 'mu' ancestors ((name 'MessagePack-Squeak-Core-mu.1' message 'Isolated package' id 'a44b229c-f324-7e44-b25a-09386b468ebe' date '2 June 2011' time '10:58:25.013 am' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
1+
(name 'MessagePack-Squeak-Core-MasashiUmezawa.7' message 'Implemented MpSqPortableUtil>>stringFromBytes: for decoding utf8 strings' id '9a4fd85e-597d-794e-8a6a-e633e2e63e8e' date '12 November 2016' time '11:28:33.274191 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Squeak-Core-MasashiUmezawa.6' message 'Added #symbolAsString/symbolAsError for changing Symbol encoding behavior' id 'b0371b80-07e7-8d4c-88db-748d7a17ce1f' date '4 June 2016' time '2:26:03.490615 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePack-Squeak-Core-MU.5' message '- Fixed MpSqEncodeTypeMapper class>>defineDoubleActionTo:- BoxedFloat64 and SmallFloat64 encode mappings were added for Spur VM.' id 'bdd0165b-4dc7-444a-a30c-98087488bede' date '19 December 2015' time '11:25:14.479 pm' author 'MU' ancestors ((name 'MessagePack-Squeak-Core-mu.4' message '- Adding encoder support for new specification (https://github.com/msgpack/msgpack/blob/master/spec.md).- MpSettings >> formatVersion will be used for switching new/old formats' id 'b611d926-78c1-d044-a2dd-7b61d7b780a2' date '19 August 2013' time '1:38:43.346 am' author 'mu' ancestors ((name 'MessagePack-Squeak-Core-mu.3' message 'Added #stringAsBytes setting. If true, String will be enceded as MessagePack raw bytes.' id '8a797bfd-5150-4e42-8655-7db9019c69f1' date '2 May 2012' time '12:59:10.973 pm' author 'mu' ancestors ((name 'MessagePack-Squeak-Core-mu.2' message 'Added MpMemoryWriteStream for bulk write performance tuning' id '42d08a68-5df4-2b4f-98d8-4b26e4b58470' date '23 October 2011' time '12:06:45.085 am' author 'mu' ancestors ((name 'MessagePack-Squeak-Core-mu.1' message 'Isolated package' id 'a44b229c-f324-7e44-b25a-09386b468ebe' date '2 June 2011' time '10:58:25.013 am' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
private
22
createByteStringSized: size
3-
^ (self createRawBytesSized: size) asString
3+
^self createStringSized: size

repository/MessagePackTest.package/MpPackUnpackTestCase.class/instance/testPackUnpackRawBytes.st

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ testPackUnpackRawBytes
44
self rawBytesArray do: [:each | | packed unpacked |
55
packed := each messagePacked: [:settings | settings formatVersion: 2008].
66
self should: [packed isMemberOf: ByteArray].
7-
unpacked := Object fromMessagePack: packed.
7+
"For invalid utf8 bytearray, we need more setting"
8+
"
9+
unpacked := Object fromMessagePack: packed] on: Error do: [ :ex | ex return ].
810
self should: [self collectionEquals: unpacked asByteArray with: each].
11+
"
912
unpacked := Object fromMessagePack: packed setting: [:settings | settings formatVersion: 2008].
1013
self should: [self collectionEquals: unpacked with: each]
1114
]

0 commit comments

Comments
 (0)