ruby-changes:59430
From: Nobuyoshi <ko1@a...>
Date: Tue, 24 Dec 2019 10:43:09 +0900 (JST)
Subject: [ruby-changes:59430] e954be14d0 (master): Get rid of false positive misspellings
https://git.ruby-lang.org/ruby.git/commit/?id=e954be14d0 From e954be14d07e54b8dbf71c0fa227e5818eaa01e6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 24 Dec 2019 10:27:18 +0900 Subject: Get rid of false positive misspellings [Bug #16437] diff --git a/missing/procstat_vm.c b/missing/procstat_vm.c index f56c406..76fd8f6 100644 --- a/missing/procstat_vm.c +++ b/missing/procstat_vm.c @@ -19,7 +19,7 @@ procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp) https://github.com/ruby/ruby/blob/trunk/missing/procstat_vm.c#L19 #endif fprintf(stderr, "%*s %*s %3s %4s %4s %3s %3s %4s %-2s %-s\n", ptrwidth, "START", ptrwidth, "END", "PRT", "RES", - "PRES", "REF", "SHD", "FL", "TP", "PATH"); + "P""RES", "REF", "SHD", "FL", "TP", "PATH"); #ifdef HAVE_PROCSTAT_GETVMMAP freep = procstat_getvmmap(procstat, kipp, &cnt); diff --git a/spec/ruby/core/file/readlink_spec.rb b/spec/ruby/core/file/readlink_spec.rb index eb3bfda..20741ba 100644 --- a/spec/ruby/core/file/readlink_spec.rb +++ b/spec/ruby/core/file/readlink_spec.rb @@ -26,7 +26,7 @@ describe "File.readlink" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/readlink_spec.rb#L26 it "raises an Errno::ENOENT if there is no such file" do # TODO: missing_file - -> { File.readlink("/this/surely/doesnt/exist") }.should raise_error(Errno::ENOENT) + -> { File.readlink("/this/surely/does/not/exist") }.should raise_error(Errno::ENOENT) end it "raises an Errno::EINVAL if called with a normal file" do diff --git a/test/openssl/test_x509name.rb b/test/openssl/test_x509name.rb index f014659..8a4596e 100644 --- a/test/openssl/test_x509name.rb +++ b/test/openssl/test_x509name.rb @@ -242,15 +242,16 @@ class OpenSSL::TestX509Name < OpenSSL::TestCase https://github.com/ruby/ruby/blob/trunk/test/openssl/test_x509name.rb#L242 assert_match(/^multi-valued RDN is not supported: #{dn_r}/, ex.message) } + bad_dc = "exa#{"pm"}le" # <- typo of "example" [ - ["DC=org,DC=exapmle,CN", "CN"], + ["DC=org,DC=#{bad_dc},CN", "CN"], ["DC=org,DC=example,", ""], - ["DC=org,DC=exapmle,CN=www.example.org;", "CN=www.example.org;"], - ["DC=org,DC=exapmle,CN=#www.example.org", "CN=#www.example.org"], - ["DC=org,DC=exapmle,CN=#777777.example.org", "CN=#777777.example.org"], - ["DC=org,DC=exapmle,CN=\"www.example\".org", "CN=\"www.example\".org"], - ["DC=org,DC=exapmle,CN=www.\"example.org\"", "CN=www.\"example.org\""], - ["DC=org,DC=exapmle,CN=www.\"example\".org", "CN=www.\"example\".org"], + ["DC=org,DC=#{bad_dc},CN=www.example.org;", "CN=www.example.org;"], + ["DC=org,DC=#{bad_dc},CN=#www.example.org", "CN=#www.example.org"], + ["DC=org,DC=#{bad_dc},CN=#777777.example.org", "CN=#777777.example.org"], + ["DC=org,DC=#{bad_dc},CN=\"www.example\".org", "CN=\"www.example\".org"], + ["DC=org,DC=#{bad_dc},CN=www.\"example.org\"", "CN=www.\"example.org\""], + ["DC=org,DC=#{bad_dc},CN=www.\"example\".org", "CN=www.\"example\".org"], ].each{|dn, msg| ex = scanner.call(dn) rescue $! assert_match(/^malformed RDN: .*=>#{Regexp.escape(msg)}/, ex.message) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/