utils/glob.rb in pdd-0.20.8 vs utils/glob.rb in pdd-0.21.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (c) 2014-2021 Yegor Bugayenko +# Copyright (c) 2014-2022 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -25,11 +25,10 @@ def initialize(glob_string) @glob_string = glob_string end # rubocop:disable Metrics/CyclomaticComplexity - # rubocop:disable Metrics/MethodLength def to_regexp chars = @glob_string.gsub(%r{(\*\*\/\*)|(\*\*)}, '*').split('') in_curlies = 0, escaping = false chars.map do |char| if escaping @@ -61,7 +60,6 @@ char end end.join end # rubocop:enable Metrics/CyclomaticComplexity - # rubocop:enable Metrics/MethodLength end