from Hacker News

Have I broken Try Ruby?

by lexy0202 on 8/7/12, 11:43 PM with 4 comments

Go to http://tryruby.org/ and open the network inspector.

Run `a = []` - and you should get 200 OK.

Run `a << a` - and you get a 500 internal server error.

Normally the sandbox will handle a problem by some kind of exception or text warning (e.g. on timeout), but it can't even handle the request.. so have I broken it?

Inspired by this video from a guy who works on the sandbox: http://www.youtube.com/watch?v=6XxCOYco3Eg

  • by maytc on 8/8/12, 7:00 AM

    Its an infinite loop. However it seems that the sandbox have some way to detect an infinite loop with while loops, etc. However this is probably an edge case they have missed.

    Good catch!

  • by patrickmclaren on 8/8/12, 4:24 AM

    Yep, looks like it. Be pragmatic about it, send them an email -- gregg@envylabs.com , or tweet them @codeschool .