Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to using stderr.puts for start up message #1818

Merged
merged 1 commit into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,3 @@ Naming/AccessorMethodName:

Style/SlicingWithRange:
Enabled: false

6 changes: 3 additions & 3 deletions lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ def condition(name = "#{caller.first[/`.*'/]} condition", &block)
end

def public=(value)
warn ':public is no longer used to avoid overloading Module#public, use :public_folder or :public_dir instead'
warn_for_deprecation ':public is no longer used to avoid overloading Module#public, use :public_folder or :public_dir instead'
set(:public_folder, value)
end

Expand Down Expand Up @@ -1772,8 +1772,8 @@ def synchronize(&block)
end

# used for deprecation warnings
def warn(message)
super message + "\n\tfrom #{cleaned_caller.first.join(':')}"
def warn_for_deprecation(message)
warn message + "\n\tfrom #{cleaned_caller.first.join(':')}"
end

# Like Kernel#caller but excluding certain magic entries
Expand Down