From 7d7bdcc5c695e96b353ee783c79ae3de76206155 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 9 Nov 2014 01:31:05 +0000 Subject: securerandom.rb: fix substring of FormatMessage result * lib/securerandom.rb: set the script encoding to make a string literal in SecureRandom::Kernel32.last_error_message single byte encoding so msg[] works in bytes, since FormatMessage() returns the size in TCHARs, not in characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/securerandom.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/securerandom.rb b/lib/securerandom.rb index a0f7b13da8..6319c2cd89 100644 --- a/lib/securerandom.rb +++ b/lib/securerandom.rb @@ -1,3 +1,4 @@ +# -*- coding: us-ascii -*- begin require 'openssl' rescue LoadError -- cgit v1.2.3