{"action":"created","issue":{"url":"https://api.github.com/repos/jarib/ffi-icu/issues/29","labels_url":"https://api.github.com/repos/jarib/ffi-icu/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/jarib/ffi-icu/issues/29/comments","events_url":"https://api.github.com/repos/jarib/ffi-icu/issues/29/events","html_url":"https://github.com/jarib/ffi-icu/issues/29","id":111852942,"number":29,"title":"[Bug] Lib modules fails to find suffix for Ubuntu 14 LTS","user":{"login":"Kulgar","id":856044,"avatar_url":"https://avatars.githubusercontent.com/u/856044?v=3","gravatar_id":"","url":"https://api.github.com/users/Kulgar","html_url":"https://github.com/Kulgar","followers_url":"https://api.github.com/users/Kulgar/followers","following_url":"https://api.github.com/users/Kulgar/following{/other_user}","gists_url":"https://api.github.com/users/Kulgar/gists{/gist_id}","starred_url":"https://api.github.com/users/Kulgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kulgar/subscriptions","organizations_url":"https://api.github.com/users/Kulgar/orgs","repos_url":"https://api.github.com/users/Kulgar/repos","events_url":"https://api.github.com/users/Kulgar/events{/privacy}","received_events_url":"https://api.github.com/users/Kulgar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-16T15:19:15Z","updated_at":"2015-10-26T11:32:57Z","closed_at":null,"body":"Hi there :)\r\n\r\nUnder Ubuntu 14 LTS (and I'm sure it also happens in 12 LTS), the gem fails to find the right suffix. \r\n\r\nUnder Ubuntu here is the printed version for ICU lib:\r\n\r\n```ruby\r\n2.1.3 :003 > ICU::Lib.version.to_s\r\n => \"52.1\" \r\n```\r\n\r\nNow if you do: \r\n\r\n```ruby\r\n2.1.3 :013 > ICU::Lib.figure_suffix(ICU::Lib.version.to_s)\r\n => nil \r\n```\r\n\r\nYou don't have the right suffix. But if you do: \r\n\r\n```ruby\r\n2.1.3 :006 > ICU::Lib.figure_suffix(\"52\")\r\n => \"_52\" \r\n```\r\n\r\nYou have it. Looking at:  https://github.com/jarib/ffi-icu/blob/master/lib/ffi-icu/lib.rb#L102\r\n\r\nYou see that the \"dot\" is not handled at all. So I think we should add something like: \r\n\r\nsuffixes << \"_#{version}\" << \"_#{version[0].chr}_#{version[1].chr}\" << \"_#{version.split('.')[0]}\" \r\n\r\nDo you think it would solve the issue? Do you want me to do a pull request after testing this out?\r\nThis bug is quite important for me as it breaks some functionnalities in applications using the gem. :)\r\n\r\nThanks!\r\nRegis. "},"comment":{"url":"https://api.github.com/repos/jarib/ffi-icu/issues/comments/151106380","html_url":"https://github.com/jarib/ffi-icu/issues/29#issuecomment-151106380","issue_url":"https://api.github.com/repos/jarib/ffi-icu/issues/29","id":151106380,"user":{"login":"jarib","id":572,"avatar_url":"https://avatars.githubusercontent.com/u/572?v=3","gravatar_id":"","url":"https://api.github.com/users/jarib","html_url":"https://github.com/jarib","followers_url":"https://api.github.com/users/jarib/followers","following_url":"https://api.github.com/users/jarib/following{/other_user}","gists_url":"https://api.github.com/users/jarib/gists{/gist_id}","starred_url":"https://api.github.com/users/jarib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarib/subscriptions","organizations_url":"https://api.github.com/users/jarib/orgs","repos_url":"https://api.github.com/users/jarib/repos","events_url":"https://api.github.com/users/jarib/events{/privacy}","received_events_url":"https://api.github.com/users/jarib/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T11:32:57Z","updated_at":"2015-10-26T11:32:57Z","body":"@Kulgar Even though `figure_suffix` isn't explicitly tested, all the specs would fail if it got the function names wrong.\r\n\r\nI guess it doesn't hurt to add another suffix to the algorithm, so I'll merge this."}}