Skip to content

Commit

Permalink
more strict when checking for IRB
Browse files Browse the repository at this point in the history
  • Loading branch information
cldwalker committed Mar 14, 2011
1 parent e657fb7 commit 05b003d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hirb/view.rb
Expand Up @@ -178,7 +178,7 @@ def enable_output_method
if defined? Ripl
@output_method = true
require 'ripl/hirb'
elsif defined? IRB
elsif defined? IRB::Irb
@output_method = true
::IRB::Irb.class_eval do
alias_method :non_hirb_view_output, :output_value
Expand All @@ -190,7 +190,7 @@ def output_value #:nodoc:
end

def disable_output_method
if defined?(IRB) && !defined? Ripl
if defined?(IRB::Irb) && !defined? Ripl
::IRB::Irb.send :alias_method, :output_value, :non_hirb_view_output
end
@output_method = nil
Expand Down

0 comments on commit 05b003d

Please sign in to comment.