{"action":"created","issue":{"url":"https://api.github.com/repos/trogdoro/xiki/issues/153","labels_url":"https://api.github.com/repos/trogdoro/xiki/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/trogdoro/xiki/issues/153/comments","events_url":"https://api.github.com/repos/trogdoro/xiki/issues/153/events","html_url":"https://github.com/trogdoro/xiki/issues/153","id":114314074,"number":153,"title":"Confusing example on code page: undefined local variable or method `a' for Object:Class","user":{"login":"thams","id":101507,"avatar_url":"https://avatars.githubusercontent.com/u/101507?v=3","gravatar_id":"","url":"https://api.github.com/users/thams","html_url":"https://github.com/thams","followers_url":"https://api.github.com/users/thams/followers","following_url":"https://api.github.com/users/thams/following{/other_user}","gists_url":"https://api.github.com/users/thams/gists{/gist_id}","starred_url":"https://api.github.com/users/thams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thams/subscriptions","organizations_url":"https://api.github.com/users/thams/orgs","repos_url":"https://api.github.com/users/thams/repos","events_url":"https://api.github.com/users/thams/events{/privacy}","received_events_url":"https://api.github.com/users/thams/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-30T17:12:56Z","updated_at":"2015-10-30T18:40:09Z","closed_at":null,"body":"This page starts like this:\r\n\r\n  | # Put some code here and expand to run it\r\n  | a = 1\r\n  | a + a\r\n\r\nBut if you expand both examples, the second one blows up.\r\n\r\n  | # Put some code here and expand to run it\r\n  | a = 1\r\n    : 2\r\n  | a + a\r\n    - tried to run: a + a\r\n    - error:\r\n      | undefined local variable or method `a' for Object:Class\r\n      |   NameError\r\n    - backtrace:\r\n      =/Users/t/xiki-master/lib/xiki/core/code.rb:2:in `eval_inner'\r\n      =/Users/t/xiki-master/lib/xiki/core/code.rb:299:in `module_eval'\r\n      =/Users/t/xiki-master/lib/xiki/core/code.rb:299:in `eval_inner'\r\n      =/Users/t/xiki-master/lib/xiki/core/code.rb:261:in `eval'\r\n      =/Users/t/xiki-master/commands/ruby.rb:48:in `menu'\r\n      =/Users/t/xiki-master/lib/xiki/core/invoker.rb:166:in `call'\r\n      =/Users/t/xiki-master/lib/xiki/core/invoker.rb:166:in `block in invoke'\r\n      =/Users/t/xiki-master/lib/xiki/core/code.rb:295:in `module_eval'\r\n      =/Users/t/xiki-master/lib/xiki/core/code.rb:295:in `eval_inner'"},"comment":{"url":"https://api.github.com/repos/trogdoro/xiki/issues/comments/152612807","html_url":"https://github.com/trogdoro/xiki/issues/153#issuecomment-152612807","issue_url":"https://api.github.com/repos/trogdoro/xiki/issues/153","id":152612807,"user":{"login":"trogdoro","id":11355,"avatar_url":"https://avatars.githubusercontent.com/u/11355?v=3","gravatar_id":"","url":"https://api.github.com/users/trogdoro","html_url":"https://github.com/trogdoro","followers_url":"https://api.github.com/users/trogdoro/followers","following_url":"https://api.github.com/users/trogdoro/following{/other_user}","gists_url":"https://api.github.com/users/trogdoro/gists{/gist_id}","starred_url":"https://api.github.com/users/trogdoro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trogdoro/subscriptions","organizations_url":"https://api.github.com/users/trogdoro/orgs","repos_url":"https://api.github.com/users/trogdoro/repos","events_url":"https://api.github.com/users/trogdoro/events{/privacy}","received_events_url":"https://api.github.com/users/trogdoro/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T18:40:09Z","updated_at":"2015-10-30T18:40:09Z","body":"> expand *the last line to run it all *\n\nThat would be misleading though, since you can expand any line to run it.\nIf there were 30 or 100 lines (which isn't uncommon) the user would think\nthey had to go all the way to the bottom to run them. It's pretty common to\nedit, run, edit, run etc.. So that would be a lot of unnecessary cursor\nmovement.\n\nIt does seem like there could be something done here to help the user\nunderstand what's going on, I just don't know what it is yet. Maybe in\ncases where the expanded line is close to the last line, the output could\nbe inserted after the last line. Or, maybe the first time the user expands\n|... lines, I could have something pop up and explain how it works.\n\n--Craig\n\n\n\n\n\nOn Fri, Oct 30, 2015 at 11:30 AM, Kurt Thams <notifications@github.com>\nwrote:\n\n> (that's the kind of change I'd put in a pull request for you if you like)\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/trogdoro/xiki/issues/153#issuecomment-152610390>.\n>\n"}}