rice 4.2.0 → 4.2.1

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: 1971d90148d0c032df2e58c7e251b57c69ad2a4ddd76d6835048b266f243e966
4
- data.tar.gz: '0933de85d9bb135813adb756ac365dfbb333bc4ddf4575614f2200af1a78c1f4'
3
+ metadata.gz: abe0f01ee83328bbd99dbf4374116b08c9b01209f3171e59b4bae01013234b81
4
+ data.tar.gz: 37180b133a4f0ec09b66367070382800a33adeef4a7916c66171be3f417f3776
5
5
  SHA512:
6
- metadata.gz: 47bbbb4ddfacf6f67fc47fdf3b1bc81b2b5a1d8c889238ef1fba751b3866598a41e82609637c294609ceb0f7d3728bde3328cc3b4110af5f676b7b293fded1e9
7
- data.tar.gz: 609458d567c204fa4156520523715e9415ac2e79bee6ddf266568408b1cb7203be68a3e216022c2dab0988d73a06c757ec63a8169d37eb0c14d80883785a708b
6
+ metadata.gz: 1b4a6cc95a81a53ec6396001ac5e2fb4e9acf94701beda44cf46b35d17c835962abe5d7faffeac048b792c8bd0c079b9f190d52a0eba6dedba7d4831cd7b5ffe
7
+ data.tar.gz: 5ff9cb1abd2d3d0f32eeb7c78f9823918c12d87bcfce45a64d47331d53bf83ee8e73772856893b3cdb71bcc087825446a5df00b6b48fe96389c374591a368c54
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## Unreleased (4.2)
1
+ ## 4.2.1
2
+
3
+ * Support systems who use `#include <experimental/filesystem>` over `#include<filesystem>`. See [#197](https://github.com/jasonroelofs/rice/issues/197) and [#201](https://github.com/jasonroelofs/rice/pull/201)
4
+
5
+ ## 4.2
2
6
 
3
7
  * Support Ruby 3.3.0.
4
8
  * Split Object.call to an explicit Object.call_kw for calling methods expecting keyword arguments.
data/CONTRIBUTORS.md CHANGED
@@ -19,3 +19,4 @@ I'd like to thank the following people for their help in making Rice what it is
19
19
  * [Andrew Kane (ankane)](https://github.com/ankane) for helping [test Rice 4](https://github.com/jasonroelofs/rice/issues/149).
20
20
  * [Maxim Samsonov (maxirmx)](https://github.com/maxirmx) for [#193](https://github.com/jasonroelofs/rice/issues/193) and [#194](https://github.com/jasonroelofs/rice/pull/194)
21
21
  * [kvtb](https://github.com/kvtb) for [#191](https://github.com/jasonroelofs/rice/issues/191)
22
+ * [thekendalmiller](https://github.com/thekendalmiller) for [#201](https://github.com/jasonroelofs/rice/pull/201)
@@ -1205,9 +1205,18 @@ namespace Rice::detail
1205
1205
  // ========= cpp_protect.hpp =========
1206
1206
 
1207
1207
  #include <regex>
1208
- #include <filesystem>
1209
1208
  #include <stdexcept>
1210
1209
 
1210
+ #if __has_include(<filesystem>)
1211
+ #include <filesystem>
1212
+ namespace fs = std::filesystem;
1213
+ #elif __has_include(<experimental/filesystem>)
1214
+ #include <experimental/filesystem>
1215
+ namespace fs = std::experimental::filesystem;
1216
+ #else
1217
+ #error "no filesystem include found :'("
1218
+ #endif
1219
+
1211
1220
 
1212
1221
  namespace Rice::detail
1213
1222
  {
@@ -1247,7 +1256,7 @@ namespace Rice::detail
1247
1256
  {
1248
1257
  rb_exc_raise(rb_exc_new2(rb_eArgError, ex.what()));
1249
1258
  }
1250
- catch (std::filesystem::filesystem_error const& ex)
1259
+ catch (fs::filesystem_error const& ex)
1251
1260
  {
1252
1261
  rb_exc_raise(rb_exc_new2(rb_eIOError, ex.what()));
1253
1262
  }
data/lib/mkmf-rice.rb CHANGED
@@ -126,5 +126,7 @@ end
126
126
  if IS_DARWIN
127
127
  have_library('c++')
128
128
  elsif !IS_MSWIN
129
- have_library('stdc++')
129
+ if !have_library('stdc++fs')
130
+ have_library('stdc++')
131
+ end
130
132
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rice
2
- VERSION = "4.2.0"
2
+ VERSION = "4.2.1"
3
3
  end
@@ -2,9 +2,18 @@
2
2
  #define Rice__detail__cpp_protect__hpp_
3
3
 
4
4
  #include <regex>
5
- #include <filesystem>
6
5
  #include <stdexcept>
7
6
 
7
+ #if __has_include(<filesystem>)
8
+ #include <filesystem>
9
+ namespace fs = std::filesystem;
10
+ #elif __has_include(<experimental/filesystem>)
11
+ #include <experimental/filesystem>
12
+ namespace fs = std::experimental::filesystem;
13
+ #else
14
+ #error "no filesystem include found :'("
15
+ #endif
16
+
8
17
  #include "Jump_Tag.hpp"
9
18
  #include "../Exception_defn.hpp"
10
19
 
@@ -46,7 +55,7 @@ namespace Rice::detail
46
55
  {
47
56
  rb_exc_raise(rb_exc_new2(rb_eArgError, ex.what()));
48
57
  }
49
- catch (std::filesystem::filesystem_error const& ex)
58
+ catch (fs::filesystem_error const& ex)
50
59
  {
51
60
  rb_exc_raise(rb_exc_new2(rb_eIOError, ex.what()));
52
61
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rice
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Brannan
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-01-10 00:00:00.000000000 Z
13
+ date: 2024-01-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  - !ruby/object:Gem::Version
232
232
  version: '0'
233
233
  requirements: []
234
- rubygems_version: 3.5.3
234
+ rubygems_version: 3.5.4
235
235
  signing_key:
236
236
  specification_version: 4
237
237
  summary: Ruby Interface for C++ Extensions