xot 0.1.27 → 0.1.28

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: f5ed9a5e7a04df7d925120557deb4778481faeffd3237f3fe62120fc3c12c855
4
- data.tar.gz: 4c0e2da4b1fa02301e3840a3f34ca8d7f2d560f26ec571718234951e21ae151c
3
+ metadata.gz: b815e9192036d41a7cd1a119bff854dac42bc51f1d0b112d5508279a9341c7b0
4
+ data.tar.gz: 12b61719ad797f1132993f2487e52c2a447a6251e64cbff761c1756b9b600c90
5
5
  SHA512:
6
- metadata.gz: 9e37970a69f634f852f309381db20b4fc591e52e121c119f6a0688a861a75c7a2f3b7d3856f9c770ecf138fdae8107a2f939d50be75497c290c90eddd7313166
7
- data.tar.gz: 0a9b20c8d9a7bec0e65bf7e68471fbfcbd95323186531024d60017ae72917538d6a996cf60e5ab583eb66ef0cb31e32bb691b0504a1a51aba666e26722419298
6
+ metadata.gz: 12d3d7845f271f2e7828d4df69cadc1098fcfdad6aa83f4aa3938a2ff64684c914548c3d0f4926fbe3ad20af766d357b3fb3a53ea7e3031f1ec720527ec61413
7
+ data.tar.gz: 0e7d50caa552534ac194781b91d0934fd19ccdd38b2b34c870127f23bd6119c38fa4c27017469ecdc93f0b9332a976effbf7919cc043cd28bb8f4ec49b9bd48c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.27
1
+ 0.1.28
data/include/xot/ref.h CHANGED
@@ -185,6 +185,12 @@ namespace Xot
185
185
 
186
186
  bool operator != (const This& obj) const {return !operator==(obj);}
187
187
 
188
+ template <typename X>
189
+ bool operator == (const Ref<X>& obj) const {return ptr == obj.get();}
190
+
191
+ template <typename X>
192
+ bool operator != (const Ref<X>& obj) const {return !operator==(obj);}
193
+
188
194
  bool operator < (const This& obj) const {return ptr < obj.ptr;}
189
195
 
190
196
  operator bool () const {return ptr != NULL;}
@@ -272,6 +278,12 @@ namespace Xot
272
278
 
273
279
  bool operator != (const This& obj) const {return !operator==(obj);}
274
280
 
281
+ template <typename X>
282
+ bool operator == (const Ref<X>& obj) const {return ptr == obj.get();}
283
+
284
+ template <typename X>
285
+ bool operator != (const Ref<X>& obj) const {return !operator==(obj);}
286
+
275
287
  bool operator < (const This& obj) const {return ptr < obj.ptr;}
276
288
 
277
289
  operator bool () const {return ptr != NULL;}
@@ -6,11 +6,11 @@ module Xot
6
6
 
7
7
  module BlockUtil
8
8
 
9
- def instance_eval_or_block_call(recv, *args, &block)
9
+ def instance_eval_or_block_call(recv, *args, **kwargs, &block)
10
10
  if block.arity == 0
11
11
  recv.instance_eval(&block)
12
12
  else
13
- block.call recv, *args
13
+ block.call recv, *args, **kwargs
14
14
  end
15
15
  end
16
16
 
data/lib/xot/rake/util.rb CHANGED
@@ -228,8 +228,8 @@ module Xot
228
228
  s = flags.dup
229
229
  s << warning_opts.map {|s| " -W#{s}"}.join
230
230
  s << " -arch arm64" if RUBY_PLATFORM =~ /arm64-darwin/
231
- s << ' -std=c++17' if gcc?
232
- s << ' -std=c++17 -stdlib=libc++ -mmacosx-version-min=10.7' if clang?
231
+ s << ' -std=c++20' if gcc?
232
+ s << ' -std=c++20 -stdlib=libc++ -mmacosx-version-min=10.7' if clang?
233
233
  s << ' ' + RbConfig::CONFIG['debugflags'] if debug?
234
234
  s.gsub!(/-O\d?\w*/, '-O0') if debug?
235
235
  s
@@ -20,8 +20,8 @@ module Xot
20
20
  alias_method :#{set}, options[:writer] || :#{name}=
21
21
  alias_method :#{get}, options[:reader] || :#{name}
22
22
  private :#{set}, :#{get}
23
- def #{name}(*args)
24
- #{set}(*args) unless args.empty?
23
+ def #{name}(*args, **kwargs)
24
+ #{set}(*args, **kwargs) unless args.empty? && args.empty?
25
25
  #{get}
26
26
  end
27
27
  END
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.27
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-29 00:00:00.000000000 Z
11
+ date: 2022-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit