Skip to content

Commit

Permalink
Update to ruby-3.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
larskanis committed Oct 31, 2024
1 parent 34ec62b commit e4a38dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
20 changes: 12 additions & 8 deletions mingw-w64-ruby33/0009-Win32-Return-registry-strings-as-UTF-8.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From be7f76870b3e6abb56c24b60710a00b25bc3f4cf Mon Sep 17 00:00:00 2001
From: Lars Kanis <[email protected]>
Date: Mon, 25 Dec 2023 15:53:47 +0100
From 8f4f5e778c582ca1a64d7f74b48dc289acc64276 Mon Sep 17 00:00:00 2001
From: Lars Kanis <[email protected]>
Date: Sat, 28 Sep 2024 21:38:25 +0200
Subject: [PATCH] [Win32] Return registry strings as UTF-8

Since ruby-3.0 usually all strings from the Windows-API are returned as UTF-8 strings.
Expand All @@ -10,18 +10,22 @@ This commit changes it to UTF-8.

Fixes: https://github.com/oneclick/rubyinstaller2/issues/348
---
ext/win32/lib/win32/registry.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ext/win32/lib/win32/registry.rb | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb
index b5b99ff684..91f666cdd7 100644
index c801b1327b..1459adeaa0 100644
--- a/ext/win32/lib/win32/registry.rb
+++ b/ext/win32/lib/win32/registry.rb
@@ -69,7 +69,7 @@ module Win32
@@ -69,11 +69,7 @@ module Win32
WCHAR_NUL = "\0".encode(WCHAR).freeze
WCHAR_CR = "\r".encode(WCHAR).freeze
WCHAR_SIZE = WCHAR_NUL.bytesize
- LOCALE = Encoding.find(Encoding.locale_charmap)
- begin
- LOCALE = Encoding.find(Encoding.locale_charmap)
- rescue ArgumentError
- LOCALE = Encoding::UTF_8
- end
+ LOCALE = Encoding::UTF_8

class Registry
Expand Down
6 changes: 3 additions & 3 deletions mingw-w64-ruby33/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ _realname=ruby
pkgbase=mingw-w64-ruby33
pkgname="${MINGW_PACKAGE_PREFIX}-ruby33"
# version used by MRI
pkgver2=3.3.5
pkgver2=3.3.6
# version used by pacman
pkgver="${pkgver2/-/.}"
pkgrel=1
Expand All @@ -29,10 +29,10 @@ source=("https://cache.ruby-lang.org/pub/ruby/${pkgver2%.*}/${_realname}-${pkgve

# To update SHA256 hashs run: ridk exec sh -c "updpkgsums PKGBUILD"

sha256sums=('51aec7ea89b46125a2c9adc6f36766b65023d47952b916b1aed300ddcc042359'
sha256sums=('540975969d1af42190d26ff629bc93b1c3f4bffff4ab253e245e125085e66266'
'a50c81ab8c178689485257f8eaa70bd8184b878a798780084668f838912e2832'
'da079dbfdc3d4e1b976ed15d58244ed6e0df201ec829bead578fb4a7177b9cab'
'd221e357861ff3f46f29de978cc00a8f12ffdd865a5d8c1783f3e31e34675808'
'5f84680f8cbce37b617f132e09009c111c78044d92378562456d8814db449346'
'124f221ceb75d40e9f429603bf2383d8e60ad5fee9e2a9849e82bc9b89a41571'
'6c80ba2ca49840e387a08b7fedc6e7acd298ac2ec853155209efb2af20397b22'
'c30fb04ac0e88ba634daaa811a81ea5a75027646617b895acd14df9518a4a55a')
Expand Down

0 comments on commit e4a38dc

Please sign in to comment.