--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: "Creates a new GDBM instance by opening a gdbm file named filename. If the file does not exist, a new file with file mode mode will be created. flags may be one of the following:" - !ruby/object:SM::Flow::LIST contents: - !ruby/struct:SM::Flow::LI label: "*" body: READER - open as a reader - !ruby/struct:SM::Flow::LI label: "*" body: WRITER - open as a writer - !ruby/struct:SM::Flow::LI label: "*" body: WRCREAT - open as a writer; if the database does not exist, create a new one - !ruby/struct:SM::Flow::LI label: "*" body: NEWDB - open as a writer; overwrite any existing databases type: :BULLET - !ruby/struct:SM::Flow::P body: "The values WRITER, WRCREAT and NEWDB may be combined with the following values by bitwise or:" - !ruby/object:SM::Flow::LIST contents: - !ruby/struct:SM::Flow::LI label: "*" body: SYNC - cause all database operations to be synchronized to the disk - !ruby/struct:SM::Flow::LI label: "*" body: NOLOCK - do not lock the database file type: :BULLET - !ruby/struct:SM::Flow::P body: If no flags are specified, the GDBM object will try to open the database file as a writer and will create it if it does not already exist (cf. flag WRCREAT). If this fails (for instance, if another process has already opened the database as a reader), it will try to open the database file as a reader (cf. flag READER). full_name: GDBM::new is_singleton: true name: new params: | GDBM.new(filename, mode = 0666, flags = nil) visibility: public