Skip to content

Commit ae09a46

Browse files
authored
fix: leverage ruby-2.7 parameter forwarding (#431)
1 parent e1dd811 commit ae09a46

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.standard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fix: true
22
parallel: true
3-
ruby_version: 2.4
3+
ruby_version: 2.7
44

55
ignore:
66
- 'vendor/**/*'

graphiti.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
1616
spec.bindir = "exe"
1717
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
1818
spec.require_paths = ["lib"]
19-
spec.required_ruby_version = ">= 2.6"
19+
spec.required_ruby_version = ">= 2.7"
2020

2121
spec.add_dependency "jsonapi-serializable", "~> 0.3.0"
2222
spec.add_dependency "jsonapi-renderer", "~> 0.2", ">= 0.2.2"

lib/graphiti/serializer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ def as_jsonapi(kwargs = {})
7171
end
7272

7373
# Allow access to resource methods
74-
def method_missing(id, *args, &blk)
74+
def method_missing(id, ...)
7575
if @resource.respond_to?(id, true)
76-
@resource.send(id, *args, &blk)
76+
@resource.send(id, ...)
7777
else
7878
super
7979
end

0 commit comments

Comments
 (0)