diff options
Diffstat (limited to 'spec/ffi')
-rw-r--r-- | spec/ffi/memorypointer_spec.rb | 4 | ||||
-rw-r--r-- | spec/ffi/pointer_spec.rb | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/ffi/memorypointer_spec.rb b/spec/ffi/memorypointer_spec.rb index 904fdc9..f29e2cb 100644 --- a/spec/ffi/memorypointer_spec.rb +++ b/spec/ffi/memorypointer_spec.rb @@ -37,6 +37,8 @@ describe "MemoryPointer#clear" do expect(ptr.read_long).to eq(0) end it "should deny changes when frozen" do + skip "not yet supported on TruffleRuby" if RUBY_ENGINE == "truffleruby" + skip "not yet supported on JRuby" if RUBY_ENGINE == "jruby" ptr = MemoryPointer.new(:long).freeze expect{ ptr.clear }.to raise_error(RuntimeError, /memory write/) end @@ -102,6 +104,8 @@ describe "#autorelease" do end it "should deny changes when frozen" do + skip "not yet supported on TruffleRuby" if RUBY_ENGINE == "truffleruby" + skip "not yet supported on JRuby" if RUBY_ENGINE == "jruby" ptr = MemoryPointer.new(8).freeze expect{ ptr.autorelease = false }.to raise_error(FrozenError) end diff --git a/spec/ffi/pointer_spec.rb b/spec/ffi/pointer_spec.rb index 7232a5f..880ffd3 100644 --- a/spec/ffi/pointer_spec.rb +++ b/spec/ffi/pointer_spec.rb @@ -91,6 +91,8 @@ describe "Pointer" do end it "#write_pointer frozen object" do + skip "not yet supported on TruffleRuby" if RUBY_ENGINE == "truffleruby" + skip "not yet supported on JRuby" if RUBY_ENGINE == "jruby" memory = FFI::MemoryPointer.new(:pointer).freeze expect{ memory.write_pointer(PointerTestLib.ptr_from_address(0xdeadbeef)) }.to raise_error(RuntimeError, /memory write/) end |