diff --git a/CurrentVersion.props b/CurrentVersion.props index 0a9d3e1d..3739d1b8 100644 --- a/CurrentVersion.props +++ b/CurrentVersion.props @@ -1,11 +1,11 @@ - 1 - 1 - 4 - alpha - 0 + 4 + 0 + 0 + preview + 1 0 diff --git a/README.md b/README.md index c7de23ea..58da9437 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Ruby 1.9 grammar it shipped with in 2011. ```console $ ./irb.sh irb(main):001> RUBY_DESCRIPTION -=> "IronRuby 1.2.0-dev (4.0.0) on .NET 8.0.31 [x86_64-linux]" +=> "IronRuby 4.0.0-preview1 (4.0.0) on .NET 8.0.31 [x86_64-linux]" irb(main):002> def fib(n) = n < 2 ? n : fib(n - 1) + fib(n - 2) => :fib irb(main):003> (1..10).map { fib(_1) } @@ -58,6 +58,17 @@ def connect(host:, port: 5432, **opts) = Client.new(host, port, **opts) users&.filter_map { it.name if it.active? } ``` +## Version numbers + +IronRuby's version follows the Ruby version it implements: **IronRuby 4.0 is Ruby 4.0**, +and it becomes 4.1 when it moves to Ruby 4.1. The last number counts IronRuby's own +releases for that Ruby version (4.0.0, 4.0.1, ...) and is not CRuby's patch level; the +release notes say which CRuby release the specs were checked against. The last release of +the original project was 1.1.3, for Ruby 1.9.2, in 2011. + +`IRONRUBY_VERSION` is the full version (`4.0.0-preview1`), `RUBY_ENGINE_VERSION` the same +without the pre-release suffix, and `RUBY_VERSION` the Ruby version (`4.0.0`). + ## What changed | | before | after | @@ -440,7 +451,7 @@ Windows machine, keeping the same relative layout (`ir.cmd` finds the binaries u ``` C:\ir> set IR_CONFIG=Release C:\ir> ir.cmd -e "puts RUBY_DESCRIPTION" -IronRuby 1.2.0-dev (4.0.0) on .NET 8.0.31 [x64-mswin64] +IronRuby 4.0.0-preview1 (4.0.0) on .NET 8.0.31 [x64-mswin64] C:\ir> irb.cmd C:\ir> set RUBY_EXE=C:\ir\ir.cmd C:\ir> ir.cmd -Imspec/lib mspec/bin/mspec-run spec/language diff --git a/Src/Ruby/CurrentVersion.cs b/Src/Ruby/CurrentVersion.cs index 1a1f730d..8f593b1f 100644 --- a/Src/Ruby/CurrentVersion.cs +++ b/Src/Ruby/CurrentVersion.cs @@ -1,25 +1,29 @@ // Hand-maintained. The legacy build generated this from Build/Templates plus // CurrentVersion.props; the modern SDK build has no such step. +// +// Major.Minor is the Ruby version IronRuby implements: IronRuby 4.0 is Ruby 4.0, and +// moves to 4.1 when RUBY_VERSION does. Micro counts IronRuby's own releases for that +// Ruby version; it is not CRuby's patch level. using System; namespace IronRuby { public static class CurrentVersion { - public const int Major = 1; - public const int Minor = 2; + public const int Major = 4; + public const int Minor = 0; public const int Micro = 0; - public const string ReleaseLevel = "dev"; - public const int ReleaseSerial = 0; + public const string ReleaseLevel = "preview"; + public const int ReleaseSerial = 1; - public const string ShortReleaseLevel = "dev"; + public const string ShortReleaseLevel = "preview"; - public const string Series = "1.2"; - public const string DisplayVersion = "1.2.0-dev"; - public const string DisplayName = "IronRuby 1.2.0-dev"; + public const string Series = "4.0"; + public const string DisplayVersion = "4.0.0-preview1"; + public const string DisplayName = "IronRuby 4.0.0-preview1"; - public const string AssemblyVersion = "1.2.0.0"; + public const string AssemblyVersion = "4.0.0.0"; - public const string AssemblyFileVersion = "1.2.0.0"; - public const string AssemblyInformationalVersion = "IronRuby 1.2.0 dev 0"; + public const string AssemblyFileVersion = "4.0.0.0"; + public const string AssemblyInformationalVersion = "IronRuby 4.0.0 preview 1"; public static readonly Version Version = new Version(Major, Minor, Micro); } diff --git a/Src/StdLib/ironruby/ruby4.rb b/Src/StdLib/ironruby/ruby4.rb index c183f7cb..40ab1c47 100644 --- a/Src/StdLib/ironruby/ruby4.rb +++ b/Src/StdLib/ironruby/ruby4.rb @@ -1627,7 +1627,10 @@ def __pm_find_index__(arr, count) end end -RUBY_ENGINE_VERSION = RUBY_VERSION unless defined?(RUBY_ENGINE_VERSION) +# IronRuby's own version, without the pre-release suffix: 4.0.0 for 4.0.0-preview1. +# IronRuby's major.minor is the Ruby version it implements (CurrentVersion.cs), so this +# agrees with RUBY_VERSION up to IronRuby's own release counter, as it does in CRuby. +RUBY_ENGINE_VERSION = IRONRUBY_VERSION[/\A\d+\.\d+\.\d+/].freeze unless defined?(RUBY_ENGINE_VERSION) RUBY_COPYRIGHT = "ironruby - Apache License, Version 2.0".freeze unless defined?(RUBY_COPYRIGHT) RUBY_DESCRIPTION = "ironruby #{RUBY_VERSION} (.NET)".freeze unless defined?(RUBY_DESCRIPTION) diff --git a/Util/package-release.sh b/Util/package-release.sh index bf32cb70..d6401039 100755 --- a/Util/package-release.sh +++ b/Util/package-release.sh @@ -3,7 +3,7 @@ # # Util/package-release.sh linux-x64 # -> dist/ironruby--linux-x64.tar.gz # Util/package-release.sh win-x64 out # -> out/ironruby--win-x64.zip -# IR_VERSION=1.2.0-preview1 Util/package-release.sh osx-arm64 +# IR_VERSION=4.0.0-preview1 Util/package-release.sh osx-arm64 # # The archive keeps the source tree's layout - the launchers at the top, the build in # Src/Console/bin/Release/, the standard library in Src/StdLib - so ir.sh/ir.cmd,