Skip to content

Commit 9443d91

Browse files
st0012sorah
andauthored
Add a comment about Rails' patch on Workspace#filter_backtrace (#526)
* Add a comment about Rails' patch on Workspace#filter_backtrace * Update lib/irb/workspace.rb Co-authored-by: Sorah Fukumori <sora134@gmail.com> --------- Co-authored-by: Sorah Fukumori <sora134@gmail.com>
1 parent 0054a5a commit 9443d91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/irb/workspace.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ def local_variable_get(name)
122122
end
123123

124124
# error message manipulator
125+
# WARN: Rails patches this method to filter its own backtrace. Be cautious when changing it.
126+
# See: https://github.com/rails/rails/blob/main/railties/lib/rails/commands/console/console_command.rb#L8:~:text=def,filter_backtrace
125127
def filter_backtrace(bt)
126128
return nil if bt =~ /\/irb\/.*\.rb/
127129
return nil if bt =~ /\/irb\.rb/

0 commit comments

Comments
 (0)