You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a single file in a Rails application that consists of the following:
# frozen_string_literal: true
class TestController < ApplicationController
def my_method
@var = params[:field].to_i if params[:field].present?
end
end
I would expect that this successfully completes without any errors or offenses detected (at least - it doesn't visually appear that there should be offenses).
Fixesrubocop#7106.
This PR fixes an error for `Lint/NumberConversion` when `#to_i` called
on a variable on a hash. It was a regression by rubocop#6676.
Thanks, @koic. I'm just curious when I can expect this to be in a released version that's accessible via RubyGems. I'm looking to upgrade Rubocop at work, and we need to be using released versions. It's not a rush, but I don't know what the release cycle for Rubocop is. Thanks!
Expected behavior
I created a single file in a Rails application that consists of the following:
I would expect that this successfully completes without any errors or offenses detected (at least - it doesn't visually appear that there should be offenses).
Actual behavior
The following stack trace is generated:
In addition to the stack trace, Rubocop does report that 1 file was inspected and no offenses were detected.
RuboCop version
The text was updated successfully, but these errors were encountered: