mruby-struct: standardize block parameter spacing

changed block spacing from method{ to method { for consistency.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-12-06 21:46:16 +09:00
parent 0d4695a91c
commit 93cdb62985
+3 -3
View File
@@ -11,7 +11,7 @@ class Struct
#
# ISO 15.2.18.4.4
def each(&block)
self.class.members.each{|field|
self.class.members.each {|field|
block.call(self[field])
}
self
@@ -24,7 +24,7 @@ class Struct
#
# ISO 15.2.18.4.5
def each_pair(&block)
self.class.members.each{|field|
self.class.members.each {|field|
block.call(field.to_sym, self[field])
}
self
@@ -38,7 +38,7 @@ class Struct
# ISO 15.2.18.4.7
def select(&block)
ary = []
self.class.members.each{|field|
self.class.members.each {|field|
val = self[field]
ary.push(val) if block.call(val)
}