From 2ee9c6a7425653e8d7fefe28fc181a96c7f67093 Mon Sep 17 00:00:00 2001 From: Matt Moretti Date: Thu, 15 Jan 2026 10:10:08 -0500 Subject: [PATCH] Add support for Ruby 4.0 There's no syntax incompatibilities between 3.4 and 4.0; anything that works on 3 works on 4, too. --- src/about_iteration.rb | 2 +- src/about_strings.rb | 2 +- src/neo.rb | 2 +- src/path_to_enlightenment.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/about_iteration.rb b/src/about_iteration.rb index 47d19d4bf..c03621732 100644 --- a/src/about_iteration.rb +++ b/src/about_iteration.rb @@ -14,7 +14,7 @@ def as_name(name) end end - in_ruby_version("1.9", "2", "3") do + in_ruby_version("1.9", "2", "3", "4") do def as_name(name) name.to_sym end diff --git a/src/about_strings.rb b/src/about_strings.rb index cf4cc693c..69221f0ad 100644 --- a/src/about_strings.rb +++ b/src/about_strings.rb @@ -159,7 +159,7 @@ def test_in_older_ruby_single_characters_are_represented_by_integers end end - in_ruby_version("1.9", "2", "3") do + in_ruby_version("1.9", "2", "3", "4") do def test_in_modern_ruby_single_characters_are_represented_by_strings assert_equal __('a'), ?a assert_equal __(false), ?a == 97 diff --git a/src/neo.rb b/src/neo.rb index 6ef420a9e..0985362a9 100644 --- a/src/neo.rb +++ b/src/neo.rb @@ -70,7 +70,7 @@ def ____(method=nil) end end - in_ruby_version("1.9", "2", "3") do + in_ruby_version("1.9", "2", "3", "4") do public :method_missing end end diff --git a/src/path_to_enlightenment.rb b/src/path_to_enlightenment.rb index 3ecf37fa7..aacf7cfb1 100644 --- a/src/path_to_enlightenment.rb +++ b/src/path_to_enlightenment.rb @@ -12,7 +12,7 @@ require 'about_nil' require 'about_hashes' require 'about_methods' -in_ruby_version("2", "3") do +in_ruby_version("2", "3", "4") do require 'about_keyword_arguments' end require 'about_constants' @@ -38,7 +38,7 @@ in_ruby_version("jruby") do require 'about_java_interop' end -in_ruby_version("2.7", "3") do +in_ruby_version("2.7", "3", "4") do require 'about_pattern_matching' end require 'about_extra_credit'