From: abudovski@... Date: 2015-08-08T17:33:59+00:00 Subject: [ruby-core:70274] [Ruby trunk - Bug #11423] [Open] ruby_cleanup does not reset initialized flag Issue #11423 has been reported by Alex Budovski. ---------------------------------------- Bug #11423: ruby_cleanup does not reset initialized flag https://bugs.ruby-lang.org/issues/11423 * Author: Alex Budovski * Status: Open * Priority: Normal * Assignee: * ruby -v: 2.2.2 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- ruby_setup checks for this static initialized to determine whether to run. int ruby_setup(void) { static int initialized = 0; int state; if (initialized) return 0; initialized = 1; But ruby_cleanup fails to reset it, causing future initializations to do nothing. This means an embedded app which runs ruby scripts in a setup/run/cleanup cycle will crash the second time. -- https://bugs.ruby-lang.org/