Skip to content

Commit

Permalink
Merge pull request #662 from Maumagnaguagno/deserialize_each_char_option
Browse files Browse the repository at this point in the history
Prefer each_char in Psych::Visitors::Visitor::ToRuby#deserialize
  • Loading branch information
hsbt authored Nov 27, 2023
2 parents 51cc86f + 5fe714b commit 02b7ef3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/psych/visitors/to_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def deserialize o
source = $1
options = 0
lang = nil
($2 || '').split('').each do |option|
$2&.each_char do |option|
case option
when 'x' then options |= Regexp::EXTENDED
when 'i' then options |= Regexp::IGNORECASE
Expand Down

0 comments on commit 02b7ef3

Please sign in to comment.