From 61a4672df7e17cc9bb91d00dda30cc0c02ec8e7f Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 16 Jun 2025 22:41:51 -0700 Subject: [PATCH] Minor readme improvements and typo fixes - Put shell commands in code blocks so they can easily be copied from the GitHub UI directly - Fix a few typos - Fix a dead link to MSDN Signed-off-by: Tim Smith --- README.md | 14 ++++++++------ lib/win32/registry.rb | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8f56065..aeac2d6 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,15 @@ Other versions of the gem can be installed in addition like so: Install the gem and add to the application's Gemfile by executing: - $ bundle add win32-registry + ```bash + bundle add win32-registry + ``` If bundler is not being used to manage dependencies, install the gem by executing: - $ gem install win32-registry + ```bash + gem install win32-registry + ``` ## Usage @@ -38,10 +42,8 @@ If bundler is not being used to manage dependencies, install the gem by executin end ``` -Be sure to use backslashs "\\" as path separator. -Forward slashs "/" will not work. -This is in contrast to file paths, which accept forward and backward slashs at will on Windows. - +Be sure to use backslashes "\\" as the path separator. Forward slashes "/" will not work. +This is in contrast to file paths, which accept forward and backward slashes at will on Windows. ## Development diff --git a/lib/win32/registry.rb b/lib/win32/registry.rb index d0cbb6a..8e2c8b2 100644 --- a/lib/win32/registry.rb +++ b/lib/win32/registry.rb @@ -372,7 +372,7 @@ def QueryInfoKey(hkey) # Replace %\w+% into the environment value of what is contained between the %'s # This method is used for REG_EXPAND_SZ. # - # For detail, see expandEnvironmentStrings[http://msdn.microsoft.com/library/en-us/sysinfo/base/expandenvironmentstrings.asp] \Win32 \API. + # For detail, see expandEnvironmentStrings[https://learn.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-expandenvironmentstringsa] \Win32 \API. # def self.expand_environ(str) str.gsub(Regexp.compile("%([^%]+)%".encode(str.encoding))) { @@ -487,7 +487,7 @@ def initialize(hkey, parent, keyname, disposition) ObjectSpace.define_finalizer self, @@final.call(@hkeyfinal) end - # Win32::Registry object of parent key, or nil if predefeined key. + # Win32::Registry object of parent key, or nil if predefined key. attr_reader :parent # Same as subkey value of Registry.open or # Registry.create method. @@ -571,7 +571,7 @@ def close # For each value it yields key, type and data. # # key is a String which contains name of key. - # type is a type contant kind of Win32::Registry::REG_* + # type is a type constant kind of Win32::Registry::REG_* # data is the value of this key. # def each_value