{"action":"closed","issue":{"url":"https://api.github.com/repos/MagLev/maglev/issues/12","labels_url":"https://api.github.com/repos/MagLev/maglev/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/MagLev/maglev/issues/12/comments","events_url":"https://api.github.com/repos/MagLev/maglev/issues/12/events","html_url":"https://github.com/MagLev/maglev/issues/12","id":1746822,"number":12,"title":"Marshal incompatibility with MRI","user":{"login":"pbm","id":23729,"avatar_url":"https://avatars.githubusercontent.com/u/23729?v=3","gravatar_id":"","url":"https://api.github.com/users/pbm","html_url":"https://github.com/pbm","followers_url":"https://api.github.com/users/pbm/followers","following_url":"https://api.github.com/users/pbm/following{/other_user}","gists_url":"https://api.github.com/users/pbm/gists{/gist_id}","starred_url":"https://api.github.com/users/pbm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbm/subscriptions","organizations_url":"https://api.github.com/users/pbm/orgs","repos_url":"https://api.github.com/users/pbm/repos","events_url":"https://api.github.com/users/pbm/events{/privacy}","received_events_url":"https://api.github.com/users/pbm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MagLev/maglev/labels/Won't%20Fix","name":"Won't Fix","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2011-09-26T22:03:52Z","updated_at":"2015-07-24T16:58:34Z","closed_at":"2015-07-24T16:58:34Z","body":"There are several incompatibilities between MRI marshalled objects and MagLev marshalled objects for core classes.  In general, the MRI marshal format encodes inst var names and values.  The MagLev inst var names (and the number of inst vars) are sometimes different than the MRI version. E.g., here is the MRI marshal format for the range (3..4):\n\n```\n\"\\004\\bo:\\nRange\\b:\\nbegini\\b:\\texclF:\\bendi\\t\"\n```\n\nand here is the MagLev version:\n\n```\n\"\\004\\be:\\017Enumerablee:\\vKernelo:\\nRange\\t:\\n@fromi\\b:\\b@toi\\t:\\b@byi\\006:\\020@excludeEnde;\\006o:\\017FalseClass\"\n```\n\nMRI has @begin, @end and @excl while MagLev has @from @to @by @excludeEnd.  In addition, MagLev records Kernel and Enumerable as ancestors, when it shouldn't.\n\nWe can't simply hook into marshal_dump/load or _dump/_load, as that would change the initial type flag from 'o' to 'U', so, perhaps we'll key off of our own marshal methods (e.g., #maglev_dump #maglev_load) and our marshal logic can then call into those to fix up inst var names etc., while still keeping the 'o' type flag.\n\nJust getting thoughts down before I go on vacation...\n\n\n## Trac Info\n+ Ticket: 540\n+ Created:  2009-06-09T15:42:39-0700\n+ Reporter: pmclain\n"}}