jit_buffer 1.0.3 → 1.0.4
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.
- checksums.yaml +4 -4
- data/lib/jit_buffer.rb +6 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e21eec19f328c27e2b584d6c4644d405086e042126be6f295c27e38b2b228429
|
4
|
+
data.tar.gz: c5a8593f5f8f800c495af6020e59a356edab4fca5ffbe82b57baef0f7781eb09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad0deb2b19ea936057da4c21a2d06f3ccbf9c84204cd51e0776e9d1f93a99417a068836c0a9d595acec5084776e52d685929167021e6182bac275cc0022a5c88
|
7
|
+
data.tar.gz: 017c1de99e6be6734445a1ec1474eb3ee640533f7d72906f5838c36724b03b27d183c75037befbd676f1beed065aaf0d3a6334456c92ce58f7ff1860c2f03dcc
|
data/lib/jit_buffer.rb
CHANGED
@@ -8,7 +8,7 @@ class Fiddle::Function
|
|
8
8
|
end unless Fiddle::Function.method_defined?(:to_proc)
|
9
9
|
|
10
10
|
class JITBuffer
|
11
|
-
VERSION = '1.0.
|
11
|
+
VERSION = '1.0.4'
|
12
12
|
|
13
13
|
class Exception < StandardError
|
14
14
|
end
|
@@ -26,6 +26,7 @@ class JITBuffer
|
|
26
26
|
PROT_WRITE = 0x02
|
27
27
|
PROT_EXEC = 0x04
|
28
28
|
|
29
|
+
MAP_SHARED = 0x01
|
29
30
|
MAP_PRIVATE = 0x02
|
30
31
|
|
31
32
|
if RUBY_PLATFORM =~ /darwin/
|
@@ -103,6 +104,10 @@ class JITBuffer
|
|
103
104
|
executable!
|
104
105
|
end
|
105
106
|
|
107
|
+
def [] a, b
|
108
|
+
@memory[a, b]
|
109
|
+
end
|
110
|
+
|
106
111
|
def putc byte
|
107
112
|
raise(ReadOnlyException, "Buffer is read only!") unless @writeable
|
108
113
|
raise(OutOfBoundsException, "Buffer full! #{pos} - #{@size}") if pos >= @size
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jit_buffer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
90
|
+
rubygems_version: 3.5.0.dev
|
91
91
|
signing_key:
|
92
92
|
specification_version: 4
|
93
93
|
summary: A JIT Buffer object for Ruby.
|