sleeping_king_studios-tools 1.1.0 → 1.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e0283e289b39463cacc292d923861867d3692aa582c11ea52e093d4a669db47
4
- data.tar.gz: 6974c66896e0f0a0b9b464326529e8d093f1842d5242a289d559b6508b08f3b6
3
+ metadata.gz: 1dd9156b88b3c8b653f2b7a6f37321fee99f0f482ae0bfb79d0ee1c0679e09f6
4
+ data.tar.gz: e5e398fc406be87504dba6b55cba7e2e97d5712a232c9ac094c5bfbd0a8904a9
5
5
  SHA512:
6
- metadata.gz: 207672541e0507cdb35887ef670cc300157c204ddf937ca21a7c1b0243cdde20d212c7daf76f2cd2c70d734f8676ef2e6c646d30f9304933be1db36126c9d2cb
7
- data.tar.gz: 5177a4f97ffd28c60b8249f9a4c8a6eafea08dd5c8fe7833273b4274e1fbb59d48e12bcda042a40d2e7d91afb850ed9e583aeeb8f728eea64feeb30c7c9da95a
6
+ metadata.gz: e716bab1aed4107cd5bd5ed501786f41ee6733aff280bfd2f4817e7f394edb834fe8aa0cfda73b73dc5a59ac1ac51631c56cdad1a7737607adef79c7c4555789
7
+ data.tar.gz: 18f416503f480b2115d5c45497f149ba5e5ca54bc559edb4e01be3d0d460dc6eeff6987abc72ea594674527e1781bae8547344cc37dbf072dbdaccc2e02924e1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.1
4
+
5
+ Fixed support for keyword parameters in `ObjectTools#apply` in Ruby 3.2.
6
+
3
7
  ## 1.1.0
4
8
 
5
9
  Files in the `Toolbox` are now autoloaded.
data/README.md CHANGED
@@ -4,7 +4,7 @@ A library of utility services and concerns to expand the functionality of core c
4
4
 
5
5
  ## About
6
6
 
7
- SleepingKingStudios::Tools is tested against MRI Ruby 2.6 through 3.1.
7
+ SleepingKingStudios::Tools is tested against MRI Ruby 2.7 through 3.2.
8
8
 
9
9
  ### Documentation
10
10
 
@@ -29,21 +29,23 @@ module SleepingKingStudios::Tools
29
29
  # @param [Object] receiver The receiver. The proc will be called in the
30
30
  # context of this object.
31
31
  # @param [Proc] proc The proc or lambda to call.
32
- # @param [Array] args Optional. Additional arguments to pass in to the
33
- # proc or lambda.
32
+ # @param [Array] args Optional. Additional arguments to pass in to the proc
33
+ # or lambda.
34
+ # @param [Hash] kwargs Optional. Additional keywords to pass in to the proc
35
+ # or lambda.
34
36
  # @param [block] block Optional. If present, will be passed in to proc or
35
37
  # lambda.
36
38
  #
37
39
  # @return The result of calling the proc or lambda with the given
38
40
  # receiver and any additional arguments or block.
39
- def apply(receiver, proc, *args, &block)
40
- return receiver.instance_exec(*args, &proc) unless block_given?
41
+ def apply(receiver, proc, *args, **kwargs, &block)
42
+ return receiver.instance_exec(*args, **kwargs, &proc) unless block_given?
41
43
 
42
44
  method_name =
43
45
  Kernel.format(TEMPORARY_METHOD_NAME, Thread.current.object_id)
44
46
 
45
47
  with_temporary_method(receiver, method_name, proc) do
46
- receiver.send(method_name, *args, &block)
48
+ receiver.send(method_name, *args, **kwargs, &block)
47
49
  end
48
50
  end
49
51
 
@@ -15,7 +15,7 @@ module SleepingKingStudios
15
15
  # Minor version.
16
16
  MINOR = 1
17
17
  # Patch version.
18
- PATCH = 0
18
+ PATCH = 1
19
19
  # Prerelease version.
20
20
  PRERELEASE = nil
21
21
  # Build metadata.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sleeping_king_studios-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob "Merlin" Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-01 00:00:00.000000000 Z
11
+ date: 2022-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubygems_version: 3.2.3
193
+ rubygems_version: 3.4.1
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: A library of utility services and concerns.