pkgsrc/lang/ruby26-base/patches/patch-lib_rubygems_platform.rb
taca 6784ce300d lang/ruby26-base: add Ruby 2.6.1
Add Ruby release 2.6.1.

Ruby 2.6.0 (2018-12-25)

New major features:

* A new JIT compiler.
* The RubyVM::AbstractSyntaxTree module.

For more detail, please refer: <https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/>


Ruby 2.6.1 (2019-01-30)

Major change:

* Net::Protocol::BufferedIO#write raises NoMethodError when sending large
  multi-byte string has been fixed.

For more detail, please refer: <https://www.ruby-lang.org/en/news/2019/01/30/ruby-2-6-1-released/>
2019-02-03 13:41:33 +00:00

29 lines
1.1 KiB
Ruby

$NetBSD: patch-lib_rubygems_platform.rb,v 1.1 2019/02/03 13:41:33 taca Exp $
* Don't replace "i486" to "x86".
* Allow simple "netbsd" as Gem::Platform.
--- lib/rubygems/platform.rb.orig 2018-11-21 10:20:47.000000000 +0000
+++ lib/rubygems/platform.rb
@@ -61,12 +61,7 @@ class Gem::Platform
arch.last << "-#{extra}"
end
- cpu = arch.shift
-
- @cpu = case cpu
- when /i\d86/ then 'x86'
- else cpu
- end
+ @cpu = arch.shift
if arch.length == 2 and arch.last =~ /^\d+(\.\d+)?$/ # for command-line
@os, @version = arch
@@ -95,6 +90,7 @@ class Gem::Platform
@cpu = 'x86' if @cpu.nil? and os =~ /32$/
[os, version]
when /netbsdelf/ then [ 'netbsdelf', nil ]
+ when /netbsd/ then [ 'netbsd', nil ]
when /openbsd(\d+\.\d+)?/ then [ 'openbsd', $1 ]
when /bitrig(\d+\.\d+)?/ then [ 'bitrig', $1 ]
when /solaris(\d+\.\d+)?/ then [ 'solaris', $1 ]