lib/isomorfeus/data/object_expander.rb in isomorfeus-data-2.3.0 vs lib/isomorfeus/data/object_expander.rb in isomorfeus-data-2.3.1

- old
+ new

@@ -65,10 +65,15 @@ private def open_environment FileUtils.mkdir_p(@env_path) unless Dir.exist?(@env_path) - self.environment = Isomorfeus::Hamster.new(@env_path, mapsize: Isomorfeus.hamster_mapsize) + begin + self.environment = Isomorfeus::Hamster.new(@env_path, mapsize: Isomorfeus.hamster_mapsize) + rescue RangeError + self.environment = Isomorfeus::Hamster.new(@env_path, mapsize: 2_147_483_647) + STDERR.puts "Isomorfeus::Data Warning: Hamster Object Store limited to 2Gb because of platform restrictions." + end end end end end