Skip to content

Comments

Fix warning in Ruby 2.7+#206

Merged
rgrove merged 1 commit intorgrove:masterfrom
affinity:master
Jan 6, 2021
Merged

Fix warning in Ruby 2.7+#206
rgrove merged 1 commit intorgrove:masterfrom
affinity:master

Conversation

@mscrivo
Copy link
Contributor

@mscrivo mscrivo commented Jan 6, 2021

This fixes the following warning when creating your own transformer like so:

class SomeTransformer
  def call(node:, **_)
    {
      node_allowlist: [node],
    }
  end
end
/usr/local/bundle/ruby/2.7.0/gems/sanitize-5.2.1/lib/sanitize.rb:207: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

This fixes the following warning when creating your own transformer like so:

```ruby
class SomeTransformer
  def call(node:, **_)
    {
      node_allowlist: [node],
    }
  end
end
```

```
/usr/local/bundle/ruby/2.7.0/gems/sanitize-5.2.1/lib/sanitize.rb:207: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
```
Copy link
Owner

@rgrove rgrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants