Rename warn method to warn_for_deprecation
This commit is contained in:
parent
e521b6042b
commit
21db005c71
|
@ -148,4 +148,3 @@ Naming/AccessorMethodName:
|
||||||
|
|
||||||
Style/SlicingWithRange:
|
Style/SlicingWithRange:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
|
|
@ -1408,7 +1408,7 @@ module Sinatra
|
||||||
end
|
end
|
||||||
|
|
||||||
def public=(value)
|
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)
|
set(:public_folder, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1772,8 +1772,8 @@ module Sinatra
|
||||||
end
|
end
|
||||||
|
|
||||||
# used for deprecation warnings
|
# used for deprecation warnings
|
||||||
def warn(message)
|
def warn_for_deprecation(message)
|
||||||
super message + "\n\tfrom #{cleaned_caller.first.join(':')}"
|
warn message + "\n\tfrom #{cleaned_caller.first.join(':')}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Like Kernel#caller but excluding certain magic entries
|
# Like Kernel#caller but excluding certain magic entries
|
||||||
|
|
Loading…
Reference in New Issue