diff options
Diffstat (limited to 'storage/mroonga/vendor/groonga/lib/mrb/scripts/index_cursor.rb')
-rw-r--r-- | storage/mroonga/vendor/groonga/lib/mrb/scripts/index_cursor.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/storage/mroonga/vendor/groonga/lib/mrb/scripts/index_cursor.rb b/storage/mroonga/vendor/groonga/lib/mrb/scripts/index_cursor.rb new file mode 100644 index 00000000..80440669 --- /dev/null +++ b/storage/mroonga/vendor/groonga/lib/mrb/scripts/index_cursor.rb @@ -0,0 +1,18 @@ +module Groonga + class IndexCursor + class << self + def open(*arguments) + cursor = open_raw(*arguments) + if block_given? + begin + yield(cursor) + ensure + cursor.close + end + else + cursor + end + end + end + end +end |