summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Bleigh <mbleigh@mbleigh.com>2014-04-11 21:53:16 +0000
committerMichael Bleigh <mbleigh@mbleigh.com>2014-04-11 21:53:16 +0000
commitd1c958ed03877716de6b4016550d4ffe7715d119 (patch)
tree7a3f2fce0e3e849e3e0be5e0374525fd78e19b85
parent3e9443df3235f619cdbbc0e7fad113f00ed240bf (diff)
downloadhashie-d1c958ed03877716de6b4016550d4ffe7715d119.tar.gz
Fix Rubocop issues.
-rw-r--r--lib/hashie/hash.rb4
-rw-r--r--spec/hashie/hash_spec.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/hashie/hash.rb b/lib/hashie/hash.rb
index 2304872..fae6222 100644
--- a/lib/hashie/hash.rb
+++ b/lib/hashie/hash.rb
@@ -29,9 +29,9 @@ module Hashie
def to_json(*args)
to_hash.to_json(*args)
end
-
+
private
-
+
def flexibly_convert_to_hash(object, options = {})
if object.method(:to_hash).arity == 0
object.to_hash
diff --git a/spec/hashie/hash_spec.rb b/spec/hashie/hash_spec.rb
index ad92191..c3da75b 100644
--- a/spec/hashie/hash_spec.rb
+++ b/spec/hashie/hash_spec.rb
@@ -31,16 +31,16 @@ describe Hash do
symbolized_hash = hash.to_hash(symbolize_keys: true)
expect(symbolized_hash).to eq(:a => 'hey', :"123" => 'bob', :array => [1, 2, 3])
end
-
+
it "#to_hash should not blow up when #to_hash doesn't accept arguments" do
class BareCustomMash < Hashie::Mash
def to_hash
{}
end
end
-
+
h = Hashie::Hash.new
h[:key] = BareCustomMash.new
- expect{ h.to_hash }.not_to raise_error
+ expect { h.to_hash }.not_to raise_error
end
end