Skip to content

Last argument as keyword parameters is deprecated in Ruby 2.7 #631

@wtaysom

Description

@wtaysom

I ran across it in these two spots:

/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/nmatrix-0.2.4/lib/nmatrix/shortcuts.rb:203: warning: Using the last argument as keyword parameters is deprecated
/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/nmatrix-0.2.4/lib/nmatrix/shortcuts.rb:233: warning: Using the last argument as keyword parameters is deprecated

Those are the methods NMatrix::[] and NMatrix.zeros. The fixes are trivial. For example, NMatrix.zeros could be changed to:

    def zeros(shape, **opts)
      NMatrix.new(shape, 0, **{:dtype => :float64}.merge(opts))
    end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions