Skip to content

Commit

Permalink
Use new ... argument forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Jan 11, 2023
1 parent 9ce1fa3 commit d46e284
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.0
4 changes: 2 additions & 2 deletions lib/phlex/buffered.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def initialize(object, buffer:)
end

# Alias output methods to this
def __output_method__(*args, **kwargs, &block)
output = __getobj__.public_send(__callee__, *args, **kwargs, &block)
def __output_method__(...)
output = __getobj__.public_send(__callee__, ...)
@buffer << output if output.is_a? String
nil
end
Expand Down
2 changes: 1 addition & 1 deletion lib/phlex/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def call(buffer = +"", view_context: nil, parent: nil, &block)
buffer
end

def render(renderable, *args, **kwargs, &block)
def render(renderable, &block)
case renderable
when Phlex::HTML
renderable.call(@_target, view_context: @_view_context, parent: self, &block)
Expand Down

0 comments on commit d46e284

Please sign in to comment.