From 5bea4f087ff4d49f633e0b2f3b1c1e5a0d0fc959 Mon Sep 17 00:00:00 2001 From: Bo Date: Mon, 4 Sep 2023 02:35:09 +0300 Subject: [PATCH] possible fix for #148 --- CHANGELOG.md | 4 ++++ ext/iodine/extconf.rb | 2 +- ext/iodine/iodine.c | 2 +- lib/iodine.rb | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1566874..7b1df2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ Please notice that this change log contains changes for upcoming releases as wel ## Changes: +#### Change log v.0.7.57 (2023-09-04) + +**Fix**: Fixes possible name collision when loading gem (`.rb` vs. `.so` loading). Credit to @noraj (Alexandre ZANNI) for opening issue #148. Credit to @janbiedermann (Jan Biedermann) for discovering the root cause and offering a solution. + #### Change log v.0.7.56 (2023-07-07) **Support**: Adds teapot support (HTTP code 418). Credit to Aleksandar N. Kostadinov (@akostadinov) for issue #144 and PR #145. diff --git a/ext/iodine/extconf.rb b/ext/iodine/extconf.rb index d0e2163..e7d0417 100644 --- a/ext/iodine/extconf.rb +++ b/ext/iodine/extconf.rb @@ -107,4 +107,4 @@ def iodine_test_polling_support end end -create_makefile 'iodine/iodine' +create_makefile 'iodine/iodine_ext' diff --git a/ext/iodine/iodine.c b/ext/iodine/iodine.c index 5bd99d9..a0c1272 100644 --- a/ext/iodine/iodine.c +++ b/ext/iodine/iodine.c @@ -1325,7 +1325,7 @@ Ruby loads the library and invokes the Init_ function... Here we connect all the C code to the Ruby interface, completing the bridge between Lib-Server and Ruby. ***************************************************************************** */ -void Init_iodine(void) { +void Init_iodine_ext(void) { /* common Symbol objects in use by Iodine */ #define IODINE_MAKE_SYM(name) \ do { \ diff --git a/lib/iodine.rb b/lib/iodine.rb index 738f001..e326387 100644 --- a/lib/iodine.rb +++ b/lib/iodine.rb @@ -3,7 +3,7 @@ # require 'openssl' # For SSL/TLS support using OpenSSL require_relative './iodine/version' -require_relative './iodine/iodine' # loading a binary C extension +require_relative './iodine/iodine_ext' # loading a binary C extension # Iodine is an HTTP / WebSocket server as well as an Evented Network Tool Library. In essense, Iodine is a Ruby port for the [facil.io](http://facil.io) C library. #