Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: require crystal/main sooner in prelude
The interpreter on windows segfaults because `Crystal::Once.init` wasn't called soon enough: - require "string" - require "string/builder" - require "io" - require "io/file_descriptor" - require "crystal/system/win32/file_descriptor" - at_exit <== inlined call! - Crystal::AtExitHandlers#class_getter(handlers) { ... } <== calls Crystal.once! - (...) - require "crystal/main" - Crystal.init_runtime - Crystal::Once.init <== only initialized now! Requiring crystal/main sooner makes sure that the interpreter will execute `Crystal.init_runtime` before any other inlined call that may depend on `Crystal.once`.
- Loading branch information