1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2014-11-09 01:31:05 +00:00
parent ee0b5fbd53
commit 7d7bdcc5c6
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,10 @@
Sun Nov 9 10:31:03 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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.
Sun Nov 9 09:50:22 2014 Tanaka Akira <akr@fsij.org>
* test/webrick: Refine log tests.

View file

@ -1,3 +1,4 @@
# -*- coding: us-ascii -*-
begin
require 'openssl'
rescue LoadError