diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53cab76..196b9d6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,14 @@
All changes to the Ox gem are documented here. Releases follow semantic versioning.
+## [2.14.21] - 2025-01-15
+
+### Fixed
+
+- Removed internal dependency on BigDecimal. If BigDecimal is use it
+ must now be included in the calling code. This was forced by the
+ change in BigDecimal no longer being included in the Ruby core.
+
## [2.14.20] - 2025-01-12
### Fixed
diff --git a/ext/ox/ox.c b/ext/ox/ox.c
index 2b96f59..d5a0707 100644
--- a/ext/ox/ox.c
+++ b/ext/ox/ox.c
@@ -87,7 +87,6 @@ VALUE ox_sym_bank; // Array
VALUE ox_arg_error_class;
VALUE ox_bag_clas;
-VALUE ox_bigdecimal_class;
VALUE ox_cdata_clas;
VALUE ox_comment_clas;
VALUE ox_raw_clas;
@@ -1399,7 +1398,7 @@ void Init_ox(void) {
rb_require("time");
rb_require("date");
- rb_require("bigdecimal");
+ // rb_require("bigdecimal");
rb_require("stringio");
ox_abort_id = rb_intern("abort");
@@ -1471,7 +1470,6 @@ void Init_ox(void) {
ox_arg_error_class = rb_const_get_at(Ox, rb_intern("ArgError"));
ox_struct_class = rb_const_get(rb_cObject, rb_intern("Struct"));
ox_stringio_class = rb_const_get(rb_cObject, rb_intern("StringIO"));
- ox_bigdecimal_class = rb_const_get(rb_cObject, rb_intern("BigDecimal"));
abort_sym = ID2SYM(rb_intern("abort"));
rb_gc_register_address(&abort_sym);
@@ -1589,7 +1587,6 @@ void Init_ox(void) {
rb_gc_register_address(&ox_arg_error_class);
rb_gc_register_address(&ox_bag_clas);
rb_gc_register_address(&ox_bag_clas);
- rb_gc_register_address(&ox_bigdecimal_class);
rb_gc_register_address(&ox_cdata_clas);
rb_gc_register_address(&ox_cdata_clas);
rb_gc_register_address(&ox_comment_clas);
diff --git a/ext/ox/ox.h b/ext/ox/ox.h
index b00ee88..b920902 100644
--- a/ext/ox/ox.h
+++ b/ext/ox/ox.h
@@ -218,7 +218,6 @@ extern VALUE ox_sym_bank; // Array
extern VALUE ox_version_sym;
extern VALUE ox_zero_fixnum;
-extern VALUE ox_bigdecimal_class;
extern VALUE ox_date_class;
extern VALUE ox_stringio_class;
extern VALUE ox_struct_class;
diff --git a/lib/ox/version.rb b/lib/ox/version.rb
index 94e56a9..542c69f 100644
--- a/lib/ox/version.rb
+++ b/lib/ox/version.rb
@@ -1,4 +1,4 @@
module Ox
# Current version of the module.
- VERSION = '2.14.20'
+ VERSION = '2.14.21'
end
diff --git a/test/tests.rb b/test/tests.rb
index 0524ef4..83c4e0d 100755
--- a/test/tests.rb
+++ b/test/tests.rb
@@ -3,6 +3,8 @@
# required. That can be set in the RUBYOPT environment variable.
# export RUBYOPT=-w
+# frozen_string_literal: true
+
$VERBOSE = true
$: << File.join(File.dirname(__FILE__), '../lib')
@@ -836,9 +838,6 @@ def test_circular
a << e
a << b
loaded = dump_and_load(b, false, true)
- # modify the string
- loaded.instance_variable_get(:@s).gsub!(',', '_')
- b.instance_variable_get(:@s).gsub!(',', '_')
# modify hash
loaded.instance_variable_get(:@h)[1] = 3
b.instance_variable_get(:@h)[1] = 3
@@ -1915,7 +1914,8 @@ def test_key_mod
def test_encoding_ascii
Ox.default_options = $ox_generic_options
- xml = 'Héraïdios'.force_encoding(Encoding::ASCII_8BIT)
+ xml = 'Héraïdios'.dup
+ xml.force_encoding(Encoding::ASCII_8BIT)
text = Ox.load(xml).root.text
assert_equal('Héraïdios', text)
assert_equal(Encoding::UTF_8, text.encoding)