lib/u3d/unity_project.rb in u3d-1.2.3 vs lib/u3d/unity_project.rb in u3d-1.3.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + ## --- BEGIN LICENSE BLOCK --- # Copyright (c) 2016-present WeWantToKnow AS # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -44,12 +46,13 @@ def editor_version require 'yaml' project_version = File.join(project_settings_path, 'ProjectVersion.txt') return nil unless File.exist? project_version + yaml = YAML.safe_load(File.read(project_version)) version = yaml['m_EditorVersion'] - version.gsub!(/(\d+\.\d+\.\d+)(?:x)?(\w\d+)(?:Linux)?/, '\1\2') if Helper.linux? + version = version.gsub(/(\d+\.\d+\.\d+)(?:x)?(\w\d+)(?:Linux)?/, '\1\2') if Helper.linux? version end end end