From dccc7c36f8635aefae22212fb0402b02c24ed3c9 Mon Sep 17 00:00:00 2001 From: Camillo Visini Date: Tue, 6 Jan 2026 11:41:44 +0100 Subject: [PATCH 1/2] Fix NoMethodError in RTF HTML extraction (Ruby 4) In Ruby 4, StringScanner#empty? blows up with NoMethodError. This replaces it with StringScanner#eos? which works as expected. https://docs.ruby-lang.org/en/master/StringScanner.html#method-i-eos-3F --- lib/mapi/rtf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mapi/rtf.rb b/lib/mapi/rtf.rb index 4130066..4a2c67d 100644 --- a/lib/mapi/rtf.rb +++ b/lib/mapi/rtf.rb @@ -235,7 +235,7 @@ def rtf2html rtf ignore_tag = nil # skip up to the first htmltag. return nil if we don't ever find one return nil unless scan.scan_until /(?=\{\\\*\\htmltag)/ - until scan.empty? + until scan.eos? if scan.scan /\{/ elsif scan.scan /\}/ elsif scan.scan /\\\*\\htmltag(\d+) ?/ From 98e5b339fbdd9bd159c4951ba6648999e194fe31 Mon Sep 17 00:00:00 2001 From: Camillo Visini Date: Tue, 6 Jan 2026 11:49:23 +0100 Subject: [PATCH 2/2] Remove deprecated has_rdoc for modern RubyGems --- ruby-msg.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/ruby-msg.gemspec b/ruby-msg.gemspec index 4d3f26d..6b39e1f 100644 --- a/ruby-msg.gemspec +++ b/ruby-msg.gemspec @@ -22,7 +22,6 @@ Gem::Specification.new do |s| s.files += Dir.glob('test/test_*.rb') s.files += Dir.glob('bin/*') - s.has_rdoc = true s.extra_rdoc_files = ['README.rdoc', 'ChangeLog'] s.rdoc_options += [ '--main', 'README.rdoc',