protobuf 2.4.5 → 2.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/protobuf/enum.rb CHANGED
@@ -18,7 +18,7 @@ module Protobuf
18
18
  def self.fetch(value)
19
19
  case value
20
20
  when ::Protobuf::EnumValue then
21
- value.to_i
21
+ value
22
22
  when Numeric then
23
23
  enum_by_value(value.to_i)
24
24
  when String, Symbol then
@@ -1,4 +1,4 @@
1
1
  module Protobuf
2
- VERSION = '2.4.5'
2
+ VERSION = '2.4.6'
3
3
  PROTOC_VERSION = '2.4.1'
4
4
  end
@@ -18,7 +18,7 @@ describe Protobuf::Enum do
18
18
  describe '.fetch' do
19
19
  context 'when value is an EnumValue' do
20
20
  it 'responds with that object' do
21
- Test::EnumTestType.fetch(Test::EnumTestType::THREE).should eq Test::EnumTestType::THREE
21
+ Test::EnumTestType.fetch(Test::EnumTestType::THREE).name.should eq Test::EnumTestType::THREE.name
22
22
  end
23
23
  end
24
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.5
4
+ version: 2.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -498,7 +498,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
498
498
  version: '0'
499
499
  segments:
500
500
  - 0
501
- hash: 1832425573722106451
501
+ hash: 2847695183920020007
502
502
  required_rubygems_version: !ruby/object:Gem::Requirement
503
503
  none: false
504
504
  requirements:
@@ -507,7 +507,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
507
507
  version: '0'
508
508
  segments:
509
509
  - 0
510
- hash: 1832425573722106451
510
+ hash: 2847695183920020007
511
511
  requirements: []
512
512
  rubyforge_project:
513
513
  rubygems_version: 1.8.24