diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-10-01 15:33:55 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-10-01 15:33:55 -0400 |
commit | 7d4665f60be31a0481416cfc152bac4442cc6e74 (patch) | |
tree | 295a7c81ace0792ab5a32427cdbb9c6b8e1a6184 /lib/sisu/v3/defaults.rb | |
parent | v3: vim, ftplugin/sisu.vim (diff) |
v3: cosmetic code, true ? x : y
Diffstat (limited to 'lib/sisu/v3/defaults.rb')
-rw-r--r-- | lib/sisu/v3/defaults.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sisu/v3/defaults.rb b/lib/sisu/v3/defaults.rb index 0c45ecdd..47e3c970 100644 --- a/lib/sisu/v3/defaults.rb +++ b/lib/sisu/v3/defaults.rb @@ -738,9 +738,9 @@ module SiSU_Viz gsub(/\(/,'(?:') # avoid need to escape use of brackets within regex provided m='\b(' + r + ')\b' make[:str] - make[:regx]=if x =~/i/; /#{m}/i - else /#{m}/ - end + make[:regx]=(x =~/i/) \ + ? (/#{m}/i) + : (/#{m}/) else nil end end @@ -759,9 +759,9 @@ module SiSU_Viz gsub(/\(/,'(?:') # avoid need to escape use of brackets within regex provided m='\b(' + r + ')\b' make[:str] - make[:regx]=if x =~/i/; /#{m}/i - else /#{m}/ - end + make[:regx]=(x =~/i/) \ + ? (/#{m}/i) + : (/#{m}/) else nil end make |