RubyInline 3.12.5 → 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: 0b52a9c305b0637630dac7864963cfeffcc35339b07a2e53247c993b6a6d025c
4
- data.tar.gz: aa2215a384451f9b97d8ab5671c54e3b2d00acbca603e1848d8f2dc72a093009
3
+ metadata.gz: 6fb686fe259ea5574fa2a1f00e0a6d7dc4e1d8a7aa3c1ba44b5f2fd07951962c
4
+ data.tar.gz: af619f2046cbbb045a242aa0b6292953e98cbb917244587e026d8a27e32fe9a5
5
5
  SHA512:
6
- metadata.gz: 2834680eb4b3f5a11f96d6b258d95bc72c68f3fe61e1cf8785496a4f161b429d2b5d6a0c06f004544308a52b210c846fd78a73e114b34208c7135e13cab433bd
7
- data.tar.gz: d966280a6cf13529cb3781801c39a08bd03da5c4576ddb244296b22065c1e17ccc3582d73acb07342ded1fa978a4f25d7c054f4fbd34cde1bd6a165056477a23
6
+ metadata.gz: ab7bb820deb6412c42493a8efb50e60cdcb7d3bc5ce0c6f0918efeb253c6621f3b49eb9d325d90bc968ee9a98aa011346665a16785ad2a2f438e7eeddc894448
7
+ data.tar.gz: f79d57058eef27a84ee713d108cff2acdb38b69a8a167825e673c773cc8a8cb20ad25b4c9b6af31574c16526d20870bf237eced0e0e35cd44da9ba373b16712b
checksums.yaml.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,19 @@
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
+
11
+ === 3.12.6 / 2022-05-23
12
+
13
+ * 1 bug fix:
14
+
15
+ * Removed rubinius support. LOL.
16
+
1
17
  === 3.12.5 / 2019-10-08
2
18
 
3
19
  * 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,17 +65,12 @@ class CompilationError < RuntimeError; end
65
65
  # the current namespace.
66
66
 
67
67
  module Inline
68
- VERSION = "3.12.5"
68
+ VERSION = "3.13.0"
69
69
 
70
70
  WINDOZE = /mswin|mingw/ =~ RUBY_PLATFORM
71
- RUBINIUS = defined? RUBY_ENGINE
72
71
  DEV_NULL = (WINDOZE ? 'nul' : '/dev/null')
73
72
  GEM = 'gem'
74
- RAKE = if RUBINIUS then
75
- File.join(Gem.bindir, 'rake')
76
- else
77
- "#{Gem.ruby} -S rake"
78
- end
73
+ RAKE = "#{Gem.ruby} -S rake"
79
74
 
80
75
  warn "RubyInline v #{VERSION}" if $DEBUG
81
76
 
@@ -559,6 +554,9 @@ VALUE #{method}_equals(VALUE value) {
559
554
  end
560
555
 
561
556
  if recompile then
557
+ unless RbConfig::CONFIG["ENABLE_SHARED"] == "yes" then
558
+ raise "this ruby isn't configured for dynamic linking"
559
+ end
562
560
 
563
561
  hdrdir = %w(srcdir includedir archdir rubyhdrdir).map { |name|
564
562
  RbConfig::CONFIG[name]
@@ -567,6 +565,9 @@ VALUE #{method}_equals(VALUE value) {
567
565
  } or abort "ERROR: Can't find header dir for ruby. Exiting..."
568
566
 
569
567
  flags = @flags.join(' ')
568
+
569
+ @libs << RbConfig::CONFIG['LIBRUBYARG_SHARED']
570
+
570
571
  libs = @libs.join(' ')
571
572
 
572
573
  config_hdrdir = if RbConfig::CONFIG['rubyarchhdrdir'] then
data/test/test_inline.rb CHANGED
@@ -870,8 +870,6 @@ extern \"C\" {
870
870
  end
871
871
 
872
872
  def test_build_good
873
- skip "https://github.com/MagLev/maglev/issues/231" if maglev?
874
-
875
873
  code = util_simple_code(:DumbTest1, "long dumbpi() { return 314; }")
876
874
  util_test_build(code) do
877
875
  result = DumbTest1.new.dumbpi
@@ -982,8 +980,6 @@ EOR
982
980
 
983
981
  class TestModule < InlineTestCase
984
982
  def test_nested
985
- skip "https://github.com/MagLev/maglev/issues/231" if maglev?
986
-
987
983
  Object.class_eval $test_module_code
988
984
  fb = Foo::Bar.new
989
985
  assert_equal(42, fb.forty_two_instance)
@@ -1004,16 +1000,12 @@ class TestModule < InlineTestCase
1004
1000
  end
1005
1001
 
1006
1002
  def test_argument_check_good
1007
- skip "https://github.com/MagLev/maglev/issues/231" if maglev?
1008
-
1009
1003
  util_arity_check
1010
1004
  fb = Foo::Bar.new
1011
1005
  assert_equal 13, fb.arity6(1, 2, 3, 4, 5, "blah")
1012
1006
  end
1013
1007
 
1014
1008
  def test_argument_check_fewer
1015
- skip "https://github.com/MagLev/maglev/issues/231" if maglev?
1016
-
1017
1009
  util_arity_check
1018
1010
  fb = Foo::Bar.new
1019
1011
 
@@ -1023,8 +1015,6 @@ class TestModule < InlineTestCase
1023
1015
  end
1024
1016
 
1025
1017
  def test_argument_check_more
1026
- skip "https://github.com/MagLev/maglev/issues/231" if maglev?
1027
-
1028
1018
  util_arity_check
1029
1019
  fb = Foo::Bar.new
1030
1020
  assert_raises ArgumentError do
@@ -1033,8 +1023,6 @@ class TestModule < InlineTestCase
1033
1023
  end
1034
1024
 
1035
1025
  def test_inline
1036
- skip "https://github.com/MagLev/maglev/issues/231" if maglev?
1037
-
1038
1026
  self.class.inline(:C) do |builder|
1039
1027
  builder.c "int add(int a, int b) { return a + b; }"
1040
1028
  end
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,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RubyInline
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.12.5
4
+ version: 3.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBBzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE4MTIwNDIxMzAxNFoXDTE5MTIwNDIxMzAxNFowRTETMBEGA1UE
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
- AQCbJwLmpJR2PomLU+Zzw3KRzH/hbyUWc/ftru71AopZ1fy4iY9J/BW5QYKVYwbP
26
- V0FSBWtvfI/RdwfKGtuGhPKECZgmLieGuZ3XCc09qPu1bdg7i/tu1p0t0c6163ku
27
- nDMDIC/t/DAFK0TY9I3HswuyZGbLW7rgF0DmiuZdN/RPhHq2pOLMLXJmFclCb/im
28
- 9yToml/06TJdUJ5p64mkBs0TzaK66DIB1Smd3PdtfZqoRV+EwaXMdx0Hb3zdR1JR
29
- Em82dBUFsipwMLCYj39kcyHWAxyl6Ae1Cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
30
- UfBugfLD19bu3nvL+zTAGx/U
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: 2019-10-09 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.18'
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.18'
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
@@ -112,8 +112,10 @@ files:
112
112
  homepage: http://www.zenspider.com/ZSS/Products/RubyInline/
113
113
  licenses:
114
114
  - MIT
115
- metadata: {}
116
- post_install_message:
115
+ metadata:
116
+ homepage_uri: http://www.zenspider.com/ZSS/Products/RubyInline/
117
+ source_code_uri: https://github.com/seattlerb/rubyinline
118
+ post_install_message:
117
119
  rdoc_options:
118
120
  - "--main"
119
121
  - README.txt
@@ -131,8 +133,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
133
  version: '0'
132
134
  requirements:
133
135
  - A POSIX environment and a compiler for your language.
134
- rubygems_version: 3.0.6
135
- signing_key:
136
+ rubygems_version: 3.4.3
137
+ signing_key:
136
138
  specification_version: 4
137
139
  summary: Inline allows you to write foreign code within your ruby code
138
140
  test_files: []
metadata.gz.sig CHANGED
@@ -1 +1,2 @@
1
- @T�� ������ƙ�3�����U�3'���n?��3}�j;��S���H\��hBf�т0$O?H���AI ܬ����*(��Z�*�Y t�XW�D�Xܾ�μ���b���ڼ.`���� �'w�8G�C��QOzܥ����������U�^��+s������DW�q���]���4��l&&���o- ;�7wȘ�_ �y�W���B�Ix��t
1
+ �^�����AV?���������"I:YZHvp*������������J�=� �D� �–2A��F"��kS��H(9�X��Ikt0M
2
+ �J��������N��Zu����x�T�1LG�&�