palkan / view_component-contrib

A collection of extension and developer tools for ViewComponent
MIT License
369 stars 22 forks source link

Syntax error with Ruby 2.7 #47

Closed KeyAmam closed 4 months ago

KeyAmam commented 4 months ago

What did you do?

  1. Include ViewComponentContrib::StyleVariants in a view component class
  2. Load the class

What did you expect to happen?

What actually happened?

syntax error, unexpected '='
...    def postprocess(compiled) = postprocessor.call(compiled)
...                              ^
/usr/local/bundle/gems/view_component-contrib-0.2.2/lib/view_component_contrib/style_variants.rb:211: syntax error, unexpected end-of-input, expecting `end'

Additional context

Environment

Ruby Version: 2.7

Framework Version (Rails, whatever): 7.1.3

View Component Contrib Version: 0.2.2

palkan commented 4 months ago

Oh, my bad. It should have worked on Ruby 2.7, since we're using Ruby Next; but the transpiled filed were missing from the RubyGems package. Fixed in 0.2.3.