Skip to content

Commit

Permalink
Enabled the option to actually disable paren matching
Browse files Browse the repository at this point in the history
The semantics of the ||= operator prevented the user from being able to set
`Pry.config.coolline_paren_matching = false` and have it mean anything.
Instead, ensure the parameter hasn't been defined at all before setting it.
  • Loading branch information
Dorien Snake committed Dec 9, 2014
1 parent 474aaaf commit 4759991
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/pry-coolline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
require 'pry'
require 'pry-coolline/version'

Pry.config.coolline_paren_matching ||= true
unless defined?(Pry.config.coolline_paren_matching)
Pry.config.coolline_paren_matching = true
end

Pry.config.coolline_matched_paren ||= "\e[42m"
Pry.config.coolline_mismatched_paren ||= "\e[41m"
Expand Down

0 comments on commit 4759991

Please sign in to comment.