{"action":"created","issue":{"url":"https://api.github.com/repos/higgsjs/Higgs/issues/169","labels_url":"https://api.github.com/repos/higgsjs/Higgs/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/higgsjs/Higgs/issues/169/comments","events_url":"https://api.github.com/repos/higgsjs/Higgs/issues/169/events","html_url":"https://github.com/higgsjs/Higgs/issues/169","id":53948336,"number":169,"title":"stdlib/string.js issue(s) and testing","user":{"login":"bFraley","id":3700154,"avatar_url":"https://avatars.githubusercontent.com/u/3700154?v=3","gravatar_id":"","url":"https://api.github.com/users/bFraley","html_url":"https://github.com/bFraley","followers_url":"https://api.github.com/users/bFraley/followers","following_url":"https://api.github.com/users/bFraley/following{/other_user}","gists_url":"https://api.github.com/users/bFraley/gists{/gist_id}","starred_url":"https://api.github.com/users/bFraley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bFraley/subscriptions","organizations_url":"https://api.github.com/users/bFraley/orgs","repos_url":"https://api.github.com/users/bFraley/repos","events_url":"https://api.github.com/users/bFraley/events{/privacy}","received_events_url":"https://api.github.com/users/bFraley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-01-10T06:19:52Z","updated_at":"2015-01-13T03:32:56Z","closed_at":null,"body":"V8, and browser consoles won't concat or double reference values on the example below.\r\nHopefully this helps with #111 \r\n\r\nHiggs REPL\r\n```\r\nh> a =\"A\";                                                                \r\nA\r\nh> b = \"B\";\r\nB\r\nh> c = b.replace(b, a); // c is now \"A\"...or rather return of b.replace    \r\nA\r\nh> c.replace(b, c) // c is \"A\", but holds b reference....replace with itself is \"AA\"\r\nAA\r\nh> d = c.replace(b, c);\r\nAA\r\n```\r\nExample Test\r\n```\r\n a = \"A\", b = \"B\", c = b.replace(b, a), d = c.replace(b, c);\r\n assert(d === \"A\")\r\n'String.replace unexpected result'\r\n```\r\nSee: [string.js](https://github.com/higgsjs/Higgs/blob/ffae2af9b084b87f3e13a6ced9f474353c689d90/source/stdlib/string.js#L458)"},"comment":{"url":"https://api.github.com/repos/higgsjs/Higgs/issues/comments/69690698","html_url":"https://github.com/higgsjs/Higgs/issues/169#issuecomment-69690698","issue_url":"https://api.github.com/repos/higgsjs/Higgs/issues/169","id":69690698,"user":{"login":"bFraley","id":3700154,"avatar_url":"https://avatars.githubusercontent.com/u/3700154?v=3","gravatar_id":"","url":"https://api.github.com/users/bFraley","html_url":"https://github.com/bFraley","followers_url":"https://api.github.com/users/bFraley/followers","following_url":"https://api.github.com/users/bFraley/following{/other_user}","gists_url":"https://api.github.com/users/bFraley/gists{/gist_id}","starred_url":"https://api.github.com/users/bFraley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bFraley/subscriptions","organizations_url":"https://api.github.com/users/bFraley/orgs","repos_url":"https://api.github.com/users/bFraley/repos","events_url":"https://api.github.com/users/bFraley/events{/privacy}","received_events_url":"https://api.github.com/users/bFraley/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T03:32:56Z","updated_at":"2015-01-13T03:32:56Z","body":"Sweet:-) I haven't had a chance to try, do the concatenation or new string length fixes affect the search n replace issue?\r\n\r\nThese bugs weren't found because most code wouldn't contain or use calls that expose them. Perhaps v8Regex does. It surely makes a lot of replace calls and string methods."}}