File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ Style/SafeNavigation:
244244Style/SignalException :
245245 Exclude :
246246 - Rakefile
247+ - " **/*.rake"
247248
248249# We use these sparingly, where we anticipate future branches for the
249250# inner conditional.
Original file line number Diff line number Diff line change @@ -59,12 +59,19 @@ multitask(:syntax_tree) do
5959 # 2. at label `l1`, join previously annotated line with `class | module` information.
6060 pst = sed + [ subst , "--" ]
6161
62+ success = false
63+
6264 # transform class aliases to type aliases, which syntax tree has no trouble with
6365 sh ( "#{ find . shelljoin } | #{ pre . shelljoin } " )
6466 # run syntax tree to format `*.rbs` files
65- sh ( "#{ find . shelljoin } | #{ fmt . shelljoin } " )
67+ sh ( "#{ find . shelljoin } | #{ fmt . shelljoin } " ) do
68+ success = _1
69+ end
6670 # transform type aliases back to class aliases
6771 sh ( "#{ find . shelljoin } | #{ pst . shelljoin } " )
72+
73+ # always run post-processing to remove comment marker
74+ fail unless success
6875end
6976
7077multitask ( format : [ :ruboformat , :syntax_tree ] )
Original file line number Diff line number Diff line change @@ -114,7 +114,9 @@ def coerce(value, state:)
114114 #
115115 # @return [String]
116116 def inspect ( depth : 0 )
117- return super ( ) if depth . positive?
117+ if depth . positive?
118+ return is_a? ( Module ) ? super ( ) : self . class . name
119+ end
118120
119121 members = values . map { OpenAI ::Internal ::Type ::Converter . inspect ( _1 , depth : depth . succ ) }
120122 prefix = is_a? ( Module ) ? name : self . class . name
Original file line number Diff line number Diff line change @@ -215,7 +215,9 @@ def dump(value, state:)
215215 #
216216 # @return [String]
217217 def inspect ( depth : 0 )
218- return super ( ) if depth . positive?
218+ if depth . positive?
219+ return is_a? ( Module ) ? super ( ) : self . class . name
220+ end
219221
220222 members = variants . map { OpenAI ::Internal ::Type ::Converter . inspect ( _1 , depth : depth . succ ) }
221223 prefix = is_a? ( Module ) ? name : self . class . name
You can’t perform that action at this time.
0 commit comments