RubyInline 3.12.6 → 3.13.0
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
- checksums.yaml.gz.sig +0 -0
- data/History.txt +10 -0
- data/Rakefile +3 -2
- data/example.rb +5 -5
- data/example2.rb +2 -0
- data/lib/inline.rb +7 -1
- data/tutorial/example1.rb +3 -3
- data/tutorial/example2.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +13 -13
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fb686fe259ea5574fa2a1f00e0a6d7dc4e1d8a7aa3c1ba44b5f2fd07951962c
|
4
|
+
data.tar.gz: af619f2046cbbb045a242aa0b6292953e98cbb917244587e026d8a27e32fe9a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab7bb820deb6412c42493a8efb50e60cdcb7d3bc5ce0c6f0918efeb253c6621f3b49eb9d325d90bc968ee9a98aa011346665a16785ad2a2f438e7eeddc894448
|
7
|
+
data.tar.gz: f79d57058eef27a84ee713d108cff2acdb38b69a8a167825e673c773cc8a8cb20ad25b4c9b6af31574c16526d20870bf237eced0e0e35cd44da9ba373b16712b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
=== 3.13.0 / 2023-01-31
|
2
|
+
|
3
|
+
* 1 minor enhancement:
|
4
|
+
|
5
|
+
* Error out if current ruby isn't configured for ENABLE_SHARED.
|
6
|
+
|
7
|
+
* 1 bug fix:
|
8
|
+
|
9
|
+
* Clean up examples. C++ warns about ANYARGS deprecation. Gonna have to sit with it for now.
|
10
|
+
|
1
11
|
=== 3.12.6 / 2022-05-23
|
2
12
|
|
3
13
|
* 1 bug fix:
|
data/Rakefile
CHANGED
@@ -23,11 +23,12 @@ task :test => :clean
|
|
23
23
|
|
24
24
|
desc "run all examples"
|
25
25
|
task :examples do
|
26
|
-
%w(example.rb
|
26
|
+
%w(example.rb
|
27
|
+
example2.rb
|
27
28
|
tutorial/example1.rb
|
28
29
|
tutorial/example2.rb).each do |e|
|
29
30
|
rm_rf '~/.ruby_inline'
|
30
|
-
ruby "-Ilib -w #{e}"
|
31
|
+
ruby "-Ilib -I#{Hoe.include_dirs.first} -w #{e}"
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
data/example.rb
CHANGED
@@ -55,31 +55,31 @@ end
|
|
55
55
|
puts "# of iterations = #{max}, n = #{n}"
|
56
56
|
Benchmark::bm(20) do |x|
|
57
57
|
x.report("null_time") do
|
58
|
-
|
58
|
+
max.times do
|
59
59
|
# do nothing
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
63
|
x.report("c") do
|
64
|
-
|
64
|
+
max.times do
|
65
65
|
validate(t.factorial_c(n), m)
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
69
|
x.report("c-raw") do
|
70
|
-
|
70
|
+
max.times do
|
71
71
|
validate(t.factorial_c_raw(n), m)
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
75
|
x.report("c-alias") do
|
76
|
-
|
76
|
+
max.times do
|
77
77
|
validate(t.factorial_alias(n), m)
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
81
|
x.report("pure ruby") do
|
82
|
-
|
82
|
+
max.times do
|
83
83
|
validate(t.factorial(n), m)
|
84
84
|
end
|
85
85
|
end
|
data/example2.rb
CHANGED
@@ -10,11 +10,13 @@ require 'inline'
|
|
10
10
|
class MyTest
|
11
11
|
|
12
12
|
inline do |builder|
|
13
|
+
builder.include_ruby_last
|
13
14
|
|
14
15
|
builder.add_compile_flags %q(-x c++)
|
15
16
|
builder.add_link_flags %q(-lstdc++)
|
16
17
|
|
17
18
|
builder.include "<iostream>"
|
19
|
+
builder.include '"ruby/version.h"'
|
18
20
|
|
19
21
|
builder.c "
|
20
22
|
static
|
data/lib/inline.rb
CHANGED
@@ -65,7 +65,7 @@ class CompilationError < RuntimeError; end
|
|
65
65
|
# the current namespace.
|
66
66
|
|
67
67
|
module Inline
|
68
|
-
VERSION = "3.
|
68
|
+
VERSION = "3.13.0"
|
69
69
|
|
70
70
|
WINDOZE = /mswin|mingw/ =~ RUBY_PLATFORM
|
71
71
|
DEV_NULL = (WINDOZE ? 'nul' : '/dev/null')
|
@@ -554,6 +554,9 @@ VALUE #{method}_equals(VALUE value) {
|
|
554
554
|
end
|
555
555
|
|
556
556
|
if recompile then
|
557
|
+
unless RbConfig::CONFIG["ENABLE_SHARED"] == "yes" then
|
558
|
+
raise "this ruby isn't configured for dynamic linking"
|
559
|
+
end
|
557
560
|
|
558
561
|
hdrdir = %w(srcdir includedir archdir rubyhdrdir).map { |name|
|
559
562
|
RbConfig::CONFIG[name]
|
@@ -562,6 +565,9 @@ VALUE #{method}_equals(VALUE value) {
|
|
562
565
|
} or abort "ERROR: Can't find header dir for ruby. Exiting..."
|
563
566
|
|
564
567
|
flags = @flags.join(' ')
|
568
|
+
|
569
|
+
@libs << RbConfig::CONFIG['LIBRUBYARG_SHARED']
|
570
|
+
|
565
571
|
libs = @libs.join(' ')
|
566
572
|
|
567
573
|
config_hdrdir = if RbConfig::CONFIG['rubyarchhdrdir'] then
|
data/tutorial/example1.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# We started out with some code that averaged a ton of numbers in a
|
4
4
|
# bunch of arrays. Once we finally lost our patience with the average
|
5
5
|
# running time of the code, we decided to profile and optimize it
|
6
|
-
# using RubyInline.
|
6
|
+
# using RubyInline.
|
7
7
|
|
8
8
|
class Array
|
9
9
|
|
@@ -20,7 +20,7 @@ max_size = (ARGV.shift || 100_000).to_i
|
|
20
20
|
a = (1..max_size).to_a
|
21
21
|
|
22
22
|
1.upto(max_loop) do
|
23
|
-
|
23
|
+
a.average
|
24
24
|
$stderr.print "."
|
25
25
|
end
|
26
26
|
$stderr.puts ""
|
@@ -34,7 +34,7 @@ $stderr.puts ""
|
|
34
34
|
|
35
35
|
# & time ruby ./example1.rb 5 100000
|
36
36
|
# .....
|
37
|
-
#
|
37
|
+
#
|
38
38
|
# real 0m4.580s
|
39
39
|
# user 0m3.310s
|
40
40
|
# sys 0m0.090s
|
data/tutorial/example2.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RubyInline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDPjCCAiagAwIBAgIBBzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
14
14
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
15
|
+
GRYDY29tMB4XDTIzMDEwMTA3NTExN1oXDTI0MDEwMTA3NTExN1owRTETMBEGA1UE
|
16
16
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
17
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
18
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -22,14 +22,14 @@ cert_chain:
|
|
22
22
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
23
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
24
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
AQAkg3y+PBnBAPWdxxITm5sPHqdWQgSyCpRA20o4LTuWr8BWhSXBkfQNa7cY6fOn
|
26
|
+
xyM34VPzBFbExv6XOGDfOMFBVaYTHuN9peC/5/umL7kLl+nflXzL2QA7K6LYj5Bg
|
27
|
+
sM574Onr0dZDM6Vn69bzQ7rBIFDfK/OhlPzqKZad4nsdcsVH8ODCiT+ATMIZyz5K
|
28
|
+
WCnNtqlyiWXI8tdTpahDgcUwfcN/oN7v4K8iU5IbLJX6HQ5DKgmKjfb6XyMth16k
|
29
|
+
ROfWo9Uyp8ba/j9eVG14KkYRaLydAY1MNQk2yd3R5CGfeOpD1kttxjoypoUJ2dOG
|
30
|
+
nsNBRuQJ1UfiCG97a6DNm+Fr
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
32
|
+
date: 2023-02-01 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: ZenTest
|
@@ -71,14 +71,14 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '4.0'
|
75
75
|
type: :development
|
76
76
|
prerelease: false
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '4.0'
|
82
82
|
description: |-
|
83
83
|
Inline allows you to write foreign code within your ruby code. It
|
84
84
|
automatically determines if the code in question has changed and
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
requirements:
|
135
135
|
- A POSIX environment and a compiler for your language.
|
136
|
-
rubygems_version: 3.3
|
136
|
+
rubygems_version: 3.4.3
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: Inline allows you to write foreign code within your ruby code
|
metadata.gz.sig
CHANGED
Binary file
|