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
8041dd40
Unverified
Commit
8041dd40
authored
Jun 10, 2019
by
Joshua Haberman
Committed by
GitHub
Jun 10, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6166 from blowmage/ruby-remove-to_hash
[Ruby] Remove to_hash methods
parents
a1b3d5e1
565154af
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
4 deletions
+2
-4
map.c
ruby/ext/google/protobuf_c/map.c
+0
-1
message.c
ruby/ext/google/protobuf_c/message.c
+0
-1
RubyMap.java
ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java
+1
-1
RubyMessage.java
.../src/main/java/com/google/protobuf/jruby/RubyMessage.java
+1
-1
No files found.
ruby/ext/google/protobuf_c/map.c
View file @
8041dd40
...
...
@@ -847,7 +847,6 @@ void Map_register(VALUE module) {
rb_define_method
(
klass
,
"dup"
,
Map_dup
,
0
);
rb_define_method
(
klass
,
"=="
,
Map_eq
,
1
);
rb_define_method
(
klass
,
"hash"
,
Map_hash
,
0
);
rb_define_method
(
klass
,
"to_hash"
,
Map_to_h
,
0
);
rb_define_method
(
klass
,
"to_h"
,
Map_to_h
,
0
);
rb_define_method
(
klass
,
"inspect"
,
Map_inspect
,
0
);
rb_define_method
(
klass
,
"merge"
,
Map_merge
,
1
);
...
...
ruby/ext/google/protobuf_c/message.c
View file @
8041dd40
...
...
@@ -737,7 +737,6 @@ VALUE build_class_from_descriptor(Descriptor* desc) {
rb_define_method
(
klass
,
"eql?"
,
Message_eq
,
1
);
rb_define_method
(
klass
,
"hash"
,
Message_hash
,
0
);
rb_define_method
(
klass
,
"to_h"
,
Message_to_h
,
0
);
rb_define_method
(
klass
,
"to_hash"
,
Message_to_h
,
0
);
rb_define_method
(
klass
,
"inspect"
,
Message_inspect
,
0
);
rb_define_method
(
klass
,
"to_s"
,
Message_inspect
,
0
);
rb_define_method
(
klass
,
"[]"
,
Message_index
,
1
);
...
...
ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java
View file @
8041dd40
...
...
@@ -338,7 +338,7 @@ public class RubyMap extends RubyObject {
return
newMap
;
}
@JRubyMethod
(
name
=
{
"to_h"
,
"to_hash"
}
)
@JRubyMethod
(
name
=
"to_h"
)
public
RubyHash
toHash
(
ThreadContext
context
)
{
return
RubyHash
.
newHash
(
context
.
runtime
,
table
,
context
.
runtime
.
getNil
());
}
...
...
ruby/src/main/java/com/google/protobuf/jruby/RubyMessage.java
View file @
8041dd40
...
...
@@ -368,7 +368,7 @@ public class RubyMessage extends RubyObject {
return
ret
;
}
@JRubyMethod
(
name
=
{
"to_h"
,
"to_hash"
}
)
@JRubyMethod
(
name
=
"to_h"
)
public
IRubyObject
toHash
(
ThreadContext
context
)
{
Ruby
runtime
=
context
.
runtime
;
RubyHash
ret
=
RubyHash
.
newHash
(
runtime
);
...
...
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