File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1010 describe 'read_byte'
1111
1212 it 'allows disconnect for unconnected clients' do
13- result = new_client ( connect : false ) . disconnect
13+ client = described_class . new
14+ result = client . disconnect
15+ # result = new_client(connect: false).disconnect
1416 expect ( result ) . to eq ( 0 )
1517 end
1618
1719 it 'returns 0 state' do
18- state = new_client ( connect : false ) . state
20+ client = described_class . new
21+ state = client . state
22+ # state = new_client(connect: false).state
1923 expect ( state ) . to eq ( 0 )
2024 end
2125end
Original file line number Diff line number Diff line change 77if GC . respond_to? ( :verify_compaction_references )
88 # This method was added in Ruby 3.0.0. Calling it this way asks the GC to
99 # move objects around, helping to find object movement bugs.
10- GC . verify_compaction_references ( expand_heap : true , toward : :empty )
10+ # The expand_heap parameter was added in Ruby 3.2.0
11+ if RUBY_VERSION >= '3.2.0'
12+ GC . verify_compaction_references ( expand_heap : true , toward : :empty )
13+ else
14+ GC . verify_compaction_references ( toward : :empty )
15+ end
1116end
1217
1318def new_client ( connect : true )
14- client = OPCUAClient ::Client . new
15-
16- if connect
17- # TODO
18- end
19-
20- client
19+ OPCUAClient ::Client . new
2120end
2221
2322RSpec . configure do |config |
You can’t perform that action at this time.
0 commit comments