Skip to content

Commit b1624b7

Browse files
committed
Fixed make check for Ruby library
1 parent b8f7e5b commit b1624b7

File tree

11 files changed

+597
-529
lines changed

11 files changed

+597
-529
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ project.lock.json
260260
/lib/rb/ext/mkmf.log
261261
/lib/rb/ext/thrift_native.bundle
262262
/lib/rb/ext/thrift_native.so
263-
#/lib/rb/test/
263+
/lib/rb/test/
264264
/lib/rb/thrift-*.gem
265265
/lib/php/src/ext/thrift_protocol/Makefile.*
266266
/lib/php/src/ext/thrift_protocol/build/

lib/rb/Gemfile.lock

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ PATH
22
remote: .
33
specs:
44
thrift (0.23.0)
5+
logger
56

67
GEM
78
remote: https://rubygems.org/
@@ -14,6 +15,7 @@ GEM
1415
debug_inspector (1.2.0)
1516
diff-lcs (1.6.2)
1617
eventmachine (1.2.7)
18+
logger (1.7.0)
1719
method_source (0.9.2)
1820
pry (0.11.3)
1921
coderay (~> 1.1.0)
@@ -27,7 +29,7 @@ GEM
2729
rack (2.2.21)
2830
rack-test (0.8.3)
2931
rack (>= 1.0, < 3)
30-
rake (12.3.3)
32+
rake (13.3.1)
3133
rspec (3.13.2)
3234
rspec-core (~> 3.13.0)
3335
rspec-expectations (~> 3.13.0)
@@ -62,7 +64,7 @@ DEPENDENCIES
6264
pry-stack_explorer (~> 0.4.9.2)
6365
rack (>= 2.2.20)
6466
rack-test (~> 0.8.3)
65-
rake (~> 12.3)
67+
rake (~> 13.3)
6668
rspec (~> 3.7)
6769
srv (~> 1.0)
6870
thin (~> 1.7)

lib/rb/Makefile.am

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ clean-local:
3636
check-local: all
3737
$(BUNDLER) install
3838
$(BUNDLER) exec rake
39-
$(RUBY) test/TestBinaryProtocol.rb
40-
$(RUBY) test/TestCompactProtocol.rb
41-
$(RUBY) test/TestJsonProtocol.rb
4239

4340
endif
4441

@@ -58,5 +55,4 @@ EXTRA_DIST = \
5855
benchmark \
5956
script \
6057
spec \
61-
test \
6258
README.md

lib/rb/lib/thrift/bytes.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ module Bytes
2626
#
2727
# size - The Integer size of the buffer (default: nil) to create
2828
#
29-
# Returns a String with BINARY encoding, filled with null characters
29+
# Returns a String with BINARY encoding, filled with null characters
3030
# if size is greater than zero
3131
def self.empty_byte_buffer(size = nil)
3232
if (size && size > 0)
33-
"\0".force_encoding(Encoding::BINARY) * size
33+
"\0".b * size
3434
else
35-
''.force_encoding(Encoding::BINARY)
35+
"".b
3636
end
3737
end
3838

lib/rb/lib/thrift/protocol/compact_protocol.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CompactProtocol < BaseProtocol
2727
TYPE_BITS = 0x07
2828
TYPE_SHIFT_AMOUNT = 5
2929

30-
TSTOP = ["", Types::STOP, 0]
30+
TSTOP = [nil, Types::STOP, 0]
3131

3232
#
3333
# All of the on-wire type codes.
@@ -276,7 +276,7 @@ def read_field_begin
276276

277277
# push the new field onto the field stack so we can keep the deltas going.
278278
@last_field.push(field_id)
279-
["", CompactTypes.get_ttype(type & 0x0f), field_id]
279+
[nil, CompactTypes.get_ttype(type & 0x0f), field_id]
280280
end
281281
end
282282

lib/rb/test/TestBinaryProtocol.rb

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)