Skip to content

Commit

Permalink
j
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Nov 26, 2024
1 parent 11b8a13 commit 283001e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
- "3.3"
- "head"
- "truffleruby"
- "truffleruby-head"
- "jruby"
- "jruby-head"

runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ inherit_from:
- "https://www.goodcop.style/tabs.yml"

AllCops:
TargetRubyVersion: 3.3.1
TargetRubyVersion: 3.1

# We need to disable this cop because it’s not compatible with TruffleRuby 23.1, which still needs a `require "set"`
Lint/RedundantRequireStatement:
Expand Down
4 changes: 2 additions & 2 deletions fixtures/sgml_helper.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true

module SGMLHelper
def phlex(component = Phlex::HTML, *, **, &)
component.new(*, **).call do |e|
def phlex(component = Phlex::HTML, *a, **k, &)
component.new(*a, **k).call do |e|
e.instance_exec(&)
end
end
Expand Down
8 changes: 4 additions & 4 deletions lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ def call(...)

# Create a new instance of the component.
# @note The block will not be delegated {#initialize}. Instead, it will be sent to {#template} when rendering.
def new(*, **, &block)
def new(*a, **k, &block)
if block
object = super(*, **, &nil)
object = super(*a, **k, &nil)
object.instance_exec { @_content_block = block }
object
else
Expand Down Expand Up @@ -287,13 +287,13 @@ def __yield_content_with_no_args__
nil
end

def __yield_content_with_args__(*)
def __yield_content_with_args__(*a)
return unless block_given?

buffer = @_context.buffer

original_length = buffer.bytesize
content = yield(*)
content = yield(*a)
__implicit_output__(content) if original_length == buffer.bytesize

nil
Expand Down
2 changes: 1 addition & 1 deletion phlex.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = "A high-performance view framework optimised for fun."
spec.homepage = "https://www.phlex.fun"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.2"
spec.required_ruby_version = ">= 3.1"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/phlex-ruby/phlex"
Expand Down

0 comments on commit 283001e

Please sign in to comment.