4 thoughts on “IRB Console with history and logging

  1. On line 17 of the code preview your logic is:

    result = !condition_a && !condition_b

    From boolean algebra,
    a’.b’ = (a + b)’

    Reducing it in terms of boolean algebra, a more correct, and understandable statement could be

    result = ! (condition_a || condition_b)

    The statement would become:
    irb_console_running = (rails_running or script_console_running) ‘

    This is also more intuitive. :-)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>