diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/json/lib/json/common.rb | 2 | ||||
-rw-r--r-- | ext/objspace/objspace.c | 2 | ||||
-rw-r--r-- | ext/objspace/objspace_dump.c | 9 | ||||
-rw-r--r-- | ext/win32/lib/win32/registry.rb | 6 |
4 files changed, 10 insertions, 9 deletions
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb index 6393a6df55..486ec62a58 100644 --- a/ext/json/lib/json/common.rb +++ b/ext/json/lib/json/common.rb @@ -268,7 +268,7 @@ module JSON # to string interpolation. # # Note: no validation is performed on the provided string. It is the - # responsability of the caller to ensure the string contains valid JSON. + # responsibility of the caller to ensure the string contains valid JSON. Fragment = Struct.new(:json) do def initialize(json) unless string = String.try_convert(json) diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c index 754c998ac6..5e183e78ed 100644 --- a/ext/objspace/objspace.c +++ b/ext/objspace/objspace.c @@ -504,7 +504,7 @@ count_imemo_objects(int argc, VALUE *argv, VALUE self) INIT_IMEMO_TYPE_ID(imemo_callinfo); INIT_IMEMO_TYPE_ID(imemo_callcache); INIT_IMEMO_TYPE_ID(imemo_constcache); - INIT_IMEMO_TYPE_ID(imemo_class_fields); + INIT_IMEMO_TYPE_ID(imemo_fields); #undef INIT_IMEMO_TYPE_ID } diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c index 83b434c3a1..80732d0282 100644 --- a/ext/objspace/objspace_dump.c +++ b/ext/objspace/objspace_dump.c @@ -394,9 +394,10 @@ dump_object(VALUE obj, struct dump_config *dc) dc->cur_obj = obj; dc->cur_obj_references = 0; - if (BUILTIN_TYPE(obj) == T_NODE || BUILTIN_TYPE(obj) == T_IMEMO) { + if (BUILTIN_TYPE(obj) == T_NODE || (BUILTIN_TYPE(obj) == T_IMEMO && !IMEMO_TYPE_P(obj, imemo_fields))) { dc->cur_obj_klass = 0; - } else { + } + else { dc->cur_obj_klass = RBASIC_CLASS(obj); } @@ -414,8 +415,8 @@ dump_object(VALUE obj, struct dump_config *dc) dump_append(dc, obj_type(obj)); dump_append(dc, "\""); - if (BUILTIN_TYPE(obj) != T_IMEMO) { - size_t shape_id = rb_obj_shape_id(obj); + if (BUILTIN_TYPE(obj) != T_IMEMO || IMEMO_TYPE_P(obj, imemo_fields)) { + size_t shape_id = rb_obj_shape_id(obj) & SHAPE_ID_OFFSET_MASK; dump_append(dc, ", \"shape_id\":"); dump_append_sizet(dc, shape_id); } diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb index d0cbb6afcf..8e2c8b2e1a 100644 --- a/ext/win32/lib/win32/registry.rb +++ b/ext/win32/lib/win32/registry.rb @@ -372,7 +372,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr # 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 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr 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 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr # 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 |