{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/d1588981e0248aaa0174906c99df180e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d1588981e0248aaa0174906c99df180e","url":"https://api.github.com/users/petdance","login":"petdance","id":41100},"assignee":null,"updated_at":"2011-11-14T06:13:17Z","labels":[{"name":"bug","color":"1AA195","url":"https://api.github.com/repos/petdance/scratch/labels/bug"},{"name":"core","color":"DAA3CE","url":"https://api.github.com/repos/petdance/scratch/labels/core"},{"name":"Pri-normal","color":"6770F0","url":"https://api.github.com/repos/petdance/scratch/labels/Pri-normal"},{"name":"Sev-medium","color":"473A34","url":"https://api.github.com/repos/petdance/scratch/labels/Sev-medium"}],"closed_at":null,"comments":0,"url":"https://api.github.com/repos/petdance/scratch/issues/723","body":"Code:\n```\r\n.sub main :main\r\n\r\n  $P0 = get_class 'Sub'\r\n  $P1 = subclass $P0, 'myProc'\r\n\r\n  .local pmc pirC\r\n  pirC = compreg 'PIR'\r\n\r\n  .local string code\r\n  code = <<\"END_CODE\"\r\n\r\n.sub bar\r\n  say \"hi\"\r\n.end\r\nEND_CODE\r\n\r\n  .local pmc compiled\r\n  compiled = pirC(code)\r\n  compiled = compiled[0] # just want the first executable sub here.\r\n\r\n  compiled() # works\r\n\r\n  .local pmc sub\r\n  sub = new 'myProc'\r\n  assign sub, compiled\r\n  sub() # works\r\n\r\n  $S0 = freeze sub\r\n  say \"frozen\"\r\n  $P2 = thaw $S0\r\n  say \"thawed\"\r\n  $P2()\r\n.end\r\n```\r\n\r\nOutput:\r\n```\r\nhi\r\nhi\r\nfrozen\r\nUnsupported key type in Key.thaw\r\ncurrent instr.: 'main' pc 48 (borked.pir:30)\r\n```\r\n\r\nI'd expect to be able to thaw this PMC, and then invoke the sub after thaw.\r\n\r\n\r\nOriginally http://trac.parrot.org/parrot/ticket/132 by @coke","html_url":"https://github.com/petdance/scratch/issues/723","title":"Can't thaw a Sub (or a PIR subclass of a Sub)","number":723,"id":2227041,"created_at":"2011-11-14T06:13:17Z"},"action":"opened"}