strange irb behaviour

Discussion in 'Ruby' started by junkone1@gmail.com, Aug 8, 2006.

  1. Guest

    HI
    When i use irb, sometimes i get a strage behavour especially when i do
    a error.
    As you can see from the below example, where it jumped from
    rb(main):034:0 to rb(main):035:1 when i did not close the block
    properly. now i lost my interactivity and dont know how to get back to
    the original session. I have to quit my window and restart irb again.
    is ther a better way of handling such situations











    ttp://stockcharts.com/images/footer_datafeed.gif
    > 0

    rb(main):033:0> a.each{|l|puts l.href if
    l.src=='http://stockcharts.com/images/
    co_candle_on.gif'}
    ttp://stockcharts.com/h-sc/ui?s=$COMPQ&p=D&b=5&g=0&id=p41804099534&a=74539483&l
    stNum=26
    ttp://stockcharts.com/h-sc/ui?s=$TSE&p=D&id=p41804099534&a=74539480&listNum=26
    ttp://stockcharts.com/h-sc/ui?s=$XAX&p=D&b=5&g=0&id=p41804099534&a=74539484&lis
    Num=26
    ttp://stockcharts.com/h-sc/ui?s=APCC&id=p41804099534&a=81626759&listNum=26
    ttp://stockcharts.com/h-sc/ui?s=MNC&id=p41804099534&a=81626766&listNum=26
    ttp://stockcharts.com/h-sc/ui?s=OSI&id=p41804099534&a=81697771&listNum=26
    ttp://stockcharts.com/h-sc/ui?s=YHOO&id=p41804099534&a=81626768&listNum=26
    > 0

    rb(main):034:0> a.each{|l|puts l.href if(
    l.src=='http://stockcharts.com/images
    ico_candle_on.gif' &&
    l.href.include?"http://stockcharts.com/h-sc/ui?s=$COMPQ"

    rb(main):035:1> a.each{|l|puts l.href if(
    l.src=='http://stockcharts.com/images
    ico_candle_on.gif' &&
    l.href.include?"http://stockcharts.com/h-sc/ui?s=$COMPQ")
    }
    rb(main):036:1> a.each{|l|puts l.href if(
    l.src=='http://stockcharts.com/images
    ico_candle_on.gif' && l.href.include?"=$COMPQ") }
    rb(main):037:1>
    rb(main):038:1* /
    rb(main):039:1/ }
    rb(main):040:1/ \
    rb(main):041:1/ break
    , Aug 8, 2006
    #1
    1. Advertising

  2. Eric Hodel Guest

    On Aug 8, 2006, at 9:10 AM, wrote:

    > HI
    >
    > When i use irb, sometimes i get a strage behavour especially when i do
    > a error.
    >
    > As you can see from the below example, where it jumped from
    > rb(main):034:0 to rb(main):035:1 when i did not close the block
    > properly. now i lost my interactivity and dont know how to get back to
    > the original session. I have to quit my window and restart irb again.
    > is ther a better way of handling such situations


    Hit ^C (or equivalent).

    --
    Eric Hodel - - http://blog.segment7.net
    This implementation is HODEL-HASH-9600 compliant

    http://trackmap.robotcoop.com
    Eric Hodel, Aug 8, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sam Stephenson
    Replies:
    1
    Views:
    225
    Andrew Walrond
    Jun 18, 2005
  2. Replies:
    1
    Views:
    156
    Florian GroƟ
    Oct 26, 2005
  3. anne001
    Replies:
    1
    Views:
    268
    anne001
    Jun 27, 2006
  4. Paul Pladijs

    Strange behaviour in IRB using # sign

    Paul Pladijs, Mar 3, 2008, in forum: Ruby
    Replies:
    3
    Views:
    99
    Paul Pladijs
    Mar 4, 2008
  5. Vincent V.

    Different behaviour in irb and ruby

    Vincent V., Jan 3, 2011, in forum: Ruby
    Replies:
    2
    Views:
    109
    Josh Cheek
    Jan 3, 2011
Loading...

Share This Page