RubyInline 3.12.6 → 3.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ba7b8737df8454f2428459aa7066082c3966cd52213ae62126489327ce614b9
4
- data.tar.gz: 77476279cc150dbfec24b72cfbee747af92f13489e6c46d44436deb06e095fa7
3
+ metadata.gz: 6fb686fe259ea5574fa2a1f00e0a6d7dc4e1d8a7aa3c1ba44b5f2fd07951962c
4
+ data.tar.gz: af619f2046cbbb045a242aa0b6292953e98cbb917244587e026d8a27e32fe9a5
5
5
  SHA512:
6
- metadata.gz: eb1b824084189a44908e5896fba9acb9637c26c31a5944f0c3bd9fa986aae2986e30c05f4a1886672d8dc9a46b619a8b566d5051f8504a48365ddc96d85473fd
7
- data.tar.gz: 1c9184d49d7ecf30af622fa8a6b317ca84707524f810b6ee9eb675ceb68d419814116f85eb096ffca523634e7d9f4287e538de584eb2786684b1c05f298bcb0c
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 example2.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
- for i in 0..max do
58
+ max.times do
59
59
  # do nothing
60
60
  end
61
61
  end
62
62
 
63
63
  x.report("c") do
64
- for i in 0..max do
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
- for i in 0..max do
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
- for i in 0..max do
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
- for i in 0..max do
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.12.6"
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
- avg = a.average
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
@@ -27,7 +27,7 @@ max_size = (ARGV.shift || 100_000).to_i
27
27
  a = (1..max_size).to_a
28
28
 
29
29
  1.upto(max_loop) do
30
- avg = a.average
30
+ a.average
31
31
  $stderr.print "."
32
32
  end
33
33
  $stderr.puts ""
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.12.6
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
- MIIDPjCCAiagAwIBAgIBBjANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBBzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTIxMTIyMzIzMTkwNFoXDTIyMTIyMzIzMTkwNFowRTETMBEGA1UE
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
- AQCKB5jfsuSnKb+t/Wrh3UpdkmX7TrEsjVmERC0pPqzQ5GQJgmEXDD7oMgaKXaAq
26
- x2m+KSZDrqk7c8uho5OX6YMqg4KdxehfSLqqTZGoeV78qwf/jpPQZKTf+W9gUSJh
27
- zsWpo4K50MP+QtdSbKXZwjAafpQ8hK0MnnZ/aeCsW9ov5vdXpYbf3dpg6ADXRGE7
28
- lQY2y1tJ5/chqu6h7dQmnm2ABUqx9O+JcN9hbCYoA5i/EeubUEtFIh2w3SpO6YfB
29
- JFmxn4h9YO/pVdB962BdBNNDia0kgIjI3ENnkLq0dKpYU3+F3KhEuTksLO0L6X/V
30
- YsuyUzsMz6GQA4khyaMgKNSD
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: 2022-05-23 00:00:00.000000000 Z
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: '3.23'
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: '3.23'
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.12
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