Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
4502626f
Commit
4502626f
authored
Feb 14, 2015
by
Isaiah Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Google::Protobuf::Map#inspect should be consistent with Hash#inspect
parent
e7e79a43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
map.c
ruby/ext/google/protobuf_c/map.c
+1
-1
basic.rb
ruby/tests/basic.rb
+1
-1
No files found.
ruby/ext/google/protobuf_c/map.c
View file @
4502626f
...
...
@@ -683,7 +683,7 @@ VALUE Map_inspect(VALUE _self) {
first
=
false
;
}
str
=
rb_str_append
(
str
,
rb_funcall
(
key
,
inspect_sym
,
0
));
str
=
rb_str_cat2
(
str
,
"
=>
"
);
str
=
rb_str_cat2
(
str
,
"
=>
"
);
str
=
rb_str_append
(
str
,
rb_funcall
(
value
,
inspect_sym
,
0
));
}
...
...
ruby/tests/basic.rb
View file @
4502626f
...
...
@@ -391,7 +391,7 @@ module BasicTest
# We only assert on inspect value when there is one map entry because the
# order in which elements appear is unspecified (depends on the internal
# hash function). We don't want a brittle test.
assert
m
.
inspect
==
"{
\"
jkl;
\"
=>
42}"
assert
m
.
inspect
==
"{
\"
jkl;
\"
=>
42}"
assert
m
.
keys
==
[
"jkl;"
]
assert
m
.
values
==
[
42
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment