diff --git a/lib/mongo/cursor.rb b/lib/mongo/cursor.rb index 41d5962..7a58246 100644 --- a/lib/mongo/cursor.rb +++ b/lib/mongo/cursor.rb @@ -275,6 +275,12 @@ module Mongo :timeout => @timeout } end + # Clean output for inspect. + def inspect + "" + end + private # Convert the +:fields+ parameter from a single field name or an array diff --git a/test/cursor_test.rb b/test/cursor_test.rb index eec9ad8..be5e317 100644 --- a/test/cursor_test.rb +++ b/test/cursor_test.rb @@ -17,6 +17,13 @@ class CursorTest < Test::Unit::TestCase @@coll_full_name = "#{MONGO_TEST_DB}.test" end + def test_inspect + selector = {:a => 1} + cursor = @@coll.find(selector) + assert_equal "", cursor.inspect + end + def test_explain cursor = @@coll.find('a' => 1) explaination = cursor.explain