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

Use alias_method instead of alias_method_chain #123

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/web_console/extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ def render_exception_with_web_console(env, exception)
end
end

alias_method_chain :render_exception, :web_console
alias_method :render_exception_without_web_console, :render_exception
alias_method :render_exception, :render_exception_with_web_console
end
3 changes: 2 additions & 1 deletion lib/web_console/integration/cruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def set_backtrace_with_binding_of_caller(*args)
set_backtrace_without_binding_of_caller(*args)
end

alias_method_chain :set_backtrace, :binding_of_caller
alias_method :set_backtrace_without_binding_of_caller, :set_backtrace
alias_method :set_backtrace, :set_backtrace_with_binding_of_caller
end
end
3 changes: 2 additions & 1 deletion lib/web_console/integration/rubinius.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ def raise_exception_with_current_bindings(exc)
raise_exception_without_current_bindings(exc)
end

alias_method_chain :raise_exception, :current_bindings
alias_method :raise_exception_without_current_bindings, :raise_exception
alias_method :raise_exception, :raise_exception_with_current_bindings
end