Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CurrentVersion.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MajorVersion>1</MajorVersion>
<MinorVersion>1</MinorVersion>
<MicroVersion>4</MicroVersion>
<ReleaseLevel>alpha</ReleaseLevel>
<ReleaseSerial>0</ReleaseSerial>
<MajorVersion>4</MajorVersion>
<MinorVersion>0</MinorVersion>
<MicroVersion>0</MicroVersion>
<ReleaseLevel>preview</ReleaseLevel>
<ReleaseSerial>1</ReleaseSerial>

<AssemblyRevision>0</AssemblyRevision>

Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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
Expand Down
26 changes: 15 additions & 11 deletions Src/Ruby/CurrentVersion.cs
Original file line number Diff line number Diff line change
@@ -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);
}
Expand Down
5 changes: 4 additions & 1 deletion Src/StdLib/ironruby/ruby4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion Util/package-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Util/package-release.sh linux-x64 # -> dist/ironruby-<version>-linux-x64.tar.gz
# Util/package-release.sh win-x64 out # -> out/ironruby-<version>-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/<tfm>, the standard library in Src/StdLib - so ir.sh/ir.cmd,
Expand Down
Loading