diff options
author | James McKinney <james@slashpoundbang.com> | 2015-05-27 16:34:52 -0400 |
---|---|---|
committer | James McKinney <james@slashpoundbang.com> | 2015-05-27 16:34:52 -0400 |
commit | d8da040dce219f66e7788bddf645ce9c9aa017f4 (patch) | |
tree | 63eb5e04e629a268edff6df4397abe8d95b7c666 /lib | |
parent | ef97ebe2b9b12f5c44a9382b7a81cfca765c1696 (diff) |
Eliminate !! (bang bang)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/acts_as_xapian/acts_as_xapian.rb | 2 | ||||
-rw-r--r-- | lib/attachment_to_html/adapter.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/acts_as_xapian/acts_as_xapian.rb b/lib/acts_as_xapian/acts_as_xapian.rb index 784d7ae87..7076fc586 100644 --- a/lib/acts_as_xapian/acts_as_xapian.rb +++ b/lib/acts_as_xapian/acts_as_xapian.rb @@ -844,7 +844,7 @@ module ActsAsXapian raise "Only Time or Date types supported by acts_as_xapian for :date fields, got " + value.class.to_s end elsif type == :boolean - !!value + value ? true : false else # Arrays are for terms which require multiple of them, e.g. tags if value.kind_of?(Array) diff --git a/lib/attachment_to_html/adapter.rb b/lib/attachment_to_html/adapter.rb index d8b9f41f7..058fb2a01 100644 --- a/lib/attachment_to_html/adapter.rb +++ b/lib/attachment_to_html/adapter.rb @@ -41,7 +41,7 @@ module AttachmentToHTML end def contains_images? - !!body.match(/<img[^>]*>/mi) + body.match(/<img[^>]*>/mi) end def create_tempfile(text) |