{"action":"created","issue":{"url":"https://api.github.com/repos/deivid-rodriguez/byebug/issues/153","labels_url":"https://api.github.com/repos/deivid-rodriguez/byebug/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/deivid-rodriguez/byebug/issues/153/comments","events_url":"https://api.github.com/repos/deivid-rodriguez/byebug/issues/153/events","html_url":"https://github.com/deivid-rodriguez/byebug/issues/153","id":92362959,"number":153,"title":"stepping problems with enumerator","user":{"login":"os97673","id":450628,"avatar_url":"https://avatars.githubusercontent.com/u/450628?v=3","gravatar_id":"","url":"https://api.github.com/users/os97673","html_url":"https://github.com/os97673","followers_url":"https://api.github.com/users/os97673/followers","following_url":"https://api.github.com/users/os97673/following{/other_user}","gists_url":"https://api.github.com/users/os97673/gists{/gist_id}","starred_url":"https://api.github.com/users/os97673/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/os97673/subscriptions","organizations_url":"https://api.github.com/users/os97673/orgs","repos_url":"https://api.github.com/users/os97673/repos","events_url":"https://api.github.com/users/os97673/events{/privacy}","received_events_url":"https://api.github.com/users/os97673/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-01T11:55:43Z","updated_at":"2015-07-01T12:34:17Z","closed_at":null,"body":"Working on https://youtrack.jetbrains.com/issue/RUBY-16770 (which is a problem in debase) I've noticed that byebug doesn't work well with the following code.\r\n```ruby\r\nrequire 'byebug'\r\ntriangular_numbers = Enumerator.new do |yielder|\r\n  number = 0\r\n  count = 1\r\n  byebug\r\n  loop do\r\n    number += count\r\n    count += 1\r\n    yielder.yield number\r\n  end\r\nend\r\n\r\nbyebug\r\nprint triangular_numbers.next, \" \"\r\n\r\n5.times do\r\n  # byebug\r\n  print triangular_numbers.next, \" \"\r\nend\r\n\r\nexit\r\n```\r\nif call \"next\" when you stopped at byebug inside enumerator  I'd expect it will exit the block and stop somewhere (either \"5.times\" or \"print\") but actually it works like continue :(\r\nAnother problem is that if uncomment  3rd \"byebug\" call and run next there I'd expect byebug will step over \"print\" and stop at byebug again, but it actually goes into \"loop\" inside enumarator's block.\r\n\r\nIt looks like enumarator implementation does something strange (unexpected) in term of stack: it actually completely changes it and thus all byebug's code which relies on stack size works in unexpected way.\r\n\r\nAs soon as I will fix the crash inside debase I expect the same problems there too, thus I'm filing the ticket to discuss ways to resolve it or decide what we will need from Ruby VM to fix it."},"comment":{"url":"https://api.github.com/repos/deivid-rodriguez/byebug/issues/comments/117641880","html_url":"https://github.com/deivid-rodriguez/byebug/issues/153#issuecomment-117641880","issue_url":"https://api.github.com/repos/deivid-rodriguez/byebug/issues/153","id":117641880,"user":{"login":"deivid-rodriguez","id":2887858,"avatar_url":"https://avatars.githubusercontent.com/u/2887858?v=3","gravatar_id":"","url":"https://api.github.com/users/deivid-rodriguez","html_url":"https://github.com/deivid-rodriguez","followers_url":"https://api.github.com/users/deivid-rodriguez/followers","following_url":"https://api.github.com/users/deivid-rodriguez/following{/other_user}","gists_url":"https://api.github.com/users/deivid-rodriguez/gists{/gist_id}","starred_url":"https://api.github.com/users/deivid-rodriguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deivid-rodriguez/subscriptions","organizations_url":"https://api.github.com/users/deivid-rodriguez/orgs","repos_url":"https://api.github.com/users/deivid-rodriguez/repos","events_url":"https://api.github.com/users/deivid-rodriguez/events{/privacy}","received_events_url":"https://api.github.com/users/deivid-rodriguez/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T12:34:17Z","updated_at":"2015-07-01T12:34:17Z","body":"Thanks! Keep me posted on your findings!"}}