Skip to content

Commit

Permalink
fix warning: dont call =~ on an Array, which is returning nil anyhow (#…
Browse files Browse the repository at this point in the history
…94)

* fix warning: dont call =~ on an Array, which is returning nil anyhow

* update History file and bump version

* bump version in 4.2 lock file as well
  • Loading branch information
mathieujobin committed Jul 20, 2022
1 parent 259055d commit 511ef91
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
== 0.7.1
* Eliminate noisy warning: =~ called on Array objects.

== 0.7.0
* Rails 7.0.x support.

== 0.6.2
* Relax dependency to support cucumber 7.x

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile-rails.4.2.x.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GIT
PATH
remote: ..
specs:
pickle (0.7.0)
pickle (0.7.1)
cucumber (>= 3.0, < 8.0)
rake

Expand Down
2 changes: 1 addition & 1 deletion lib/pickle/session/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def match_field

def parse_hash(hash)
hash.inject({}) do |parsed, (key, val)|
if session && val =~ /^#{capture_model}$/
if session && !val.is_a?(Array) && val =~ /^#{capture_model}$/
parsed.merge(key => session.model($1))
else
parsed.merge(key => val)
Expand Down
2 changes: 1 addition & 1 deletion lib/pickle/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Pickle
VERSION = "0.7.0"
VERSION = "0.7.1"
end

0 comments on commit 511ef91

Please sign in to comment.