Skip to content

Commit

Permalink
[chore] Enable new cops by default and fix failures
Browse files Browse the repository at this point in the history
  • Loading branch information
tombonan committed Aug 1, 2023
1 parent 971729f commit a1600a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ AllCops:
Include:
- 'lib/**/*'
- 'spec/**/*'
NewCops: enable

Layout/LineLength:
Max: 120
Expand Down
2 changes: 1 addition & 1 deletion lib/memoize_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module MemoizeBlock
# end
#
def memoize(ivar_name = nil)
ivar_name = ivar_name.nil? ? caller_locations[0].label : ivar_name
ivar_name = caller_locations[0].label if ivar_name.nil?

raise 'invalid ivar name' if ivar_name.match(/@|!/)

Expand Down

0 comments on commit a1600a7

Please sign in to comment.