{"action":"created","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/1365","labels_url":"https://api.github.com/repos/jruby/jruby/issues/1365/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/1365/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/1365/events","html_url":"https://github.com/jruby/jruby/issues/1365","id":24814637,"number":1365,"title":"System.setProperty(\"org.jruby.embed.compat.version\", \"RUBY1_8\") does not work","user":{"login":"pintubigfoot","id":5073745,"avatar_url":"https://avatars.githubusercontent.com/u/5073745?v=3","gravatar_id":"","url":"https://api.github.com/users/pintubigfoot","html_url":"https://github.com/pintubigfoot","followers_url":"https://api.github.com/users/pintubigfoot/followers","following_url":"https://api.github.com/users/pintubigfoot/following{/other_user}","gists_url":"https://api.github.com/users/pintubigfoot/gists{/gist_id}","starred_url":"https://api.github.com/users/pintubigfoot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pintubigfoot/subscriptions","organizations_url":"https://api.github.com/users/pintubigfoot/orgs","repos_url":"https://api.github.com/users/pintubigfoot/repos","events_url":"https://api.github.com/users/pintubigfoot/events{/privacy}","received_events_url":"https://api.github.com/users/pintubigfoot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jruby/jruby/labels/embed","name":"embed","color":"209da0"},{"url":"https://api.github.com/repos/jruby/jruby/labels/JRuby%201.7.x","name":"JRuby 1.7.x","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jruby/jruby/milestones/36","html_url":"https://github.com/jruby/jruby/milestones/JRuby%201.7.22","labels_url":"https://api.github.com/repos/jruby/jruby/milestones/36/labels","id":1112120,"number":36,"title":"JRuby 1.7.22","description":"","creator":{"login":"enebo","id":19819,"avatar_url":"https://avatars.githubusercontent.com/u/19819?v=3","gravatar_id":"","url":"https://api.github.com/users/enebo","html_url":"https://github.com/enebo","followers_url":"https://api.github.com/users/enebo/followers","following_url":"https://api.github.com/users/enebo/following{/other_user}","gists_url":"https://api.github.com/users/enebo/gists{/gist_id}","starred_url":"https://api.github.com/users/enebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enebo/subscriptions","organizations_url":"https://api.github.com/users/enebo/orgs","repos_url":"https://api.github.com/users/enebo/repos","events_url":"https://api.github.com/users/enebo/events{/privacy}","received_events_url":"https://api.github.com/users/enebo/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":2,"state":"open","created_at":"2015-05-15T13:41:36Z","updated_at":"2015-07-14T15:35:15Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2013-12-27T09:47:24Z","updated_at":"2015-07-15T11:46:24Z","closed_at":"2015-07-14T15:35:15Z","body":"\r\n#### Verified with jruby 1.7.9, the JSR223 does not set the compat version properly.\r\n\r\nThis is what I have tried:\r\n\r\n```java\r\n// Setting the compat version to 1.8\r\nSystem.setProperty(\"org.jruby.embed.compat.version\", \"RUBY1_8\");  \r\nScriptEngineManager manager = new ScriptEngineManager();\r\nScriptEngine engine = manager.getEngineByName(\"jruby\");\r\nengine.eval(\"require \\\"irb\\\" ; IRB.start\");\r\n```\r\n\r\nWhen I run it, it shows RUBY_VERSION is still 1.9\r\n```irb\r\nirb(main):009:0> puts RUBY_VERSION\r\n1.9.3       # --------> compat version is still 1.9\r\n=> nil\r\nirb(main):010:0> puts JRUBY_VERSION\r\n1.7.9\r\n=> nil\r\n```\r\n\r\n#### org.jruby.embed.util.SystemPropertyCatcher (line 170):\r\n\r\n```java\r\n    public static void setConfiguration(ScriptingContainer container) {\r\n        LocalContextProvider provider = container.getProvider();\r\n        RubyInstanceConfig config = provider.getRubyInstanceConfig();\r\n        String s = SafePropertyAccessor.getProperty(PropertyName.COMPILEMODE.toString());\r\n        if (s != null) {\r\n            if (\"jit\".equalsIgnoreCase(s)) {\r\n                config.setCompileMode(CompileMode.JIT);\r\n            } else if (\"force\".equalsIgnoreCase(s)) {\r\n                config.setCompileMode(CompileMode.FORCE);\r\n            } else {\r\n                config.setCompileMode(CompileMode.OFF);\r\n            }\r\n        }\r\n        s = SafePropertyAccessor.getProperty(PropertyName.COMPATVERSION.toString());\r\n        if (s != null) { \r\n            //================================================\r\n            //  JSR223 is bypassing all version except 1.9 \r\n            //================================================\r\n            if (isRuby19(s)) { \r\n                config.setCompatVersion(CompatVersion.RUBY1_9);\r\n            } \r\n        }\r\n    }\r\n```\r\n\r\nThank you.\r\n"},"comment":{"url":"https://api.github.com/repos/jruby/jruby/issues/comments/121588976","html_url":"https://github.com/jruby/jruby/issues/1365#issuecomment-121588976","issue_url":"https://api.github.com/repos/jruby/jruby/issues/1365","id":121588976,"user":{"login":"inger","id":127888,"avatar_url":"https://avatars.githubusercontent.com/u/127888?v=3","gravatar_id":"","url":"https://api.github.com/users/inger","html_url":"https://github.com/inger","followers_url":"https://api.github.com/users/inger/followers","following_url":"https://api.github.com/users/inger/following{/other_user}","gists_url":"https://api.github.com/users/inger/gists{/gist_id}","starred_url":"https://api.github.com/users/inger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inger/subscriptions","organizations_url":"https://api.github.com/users/inger/orgs","repos_url":"https://api.github.com/users/inger/repos","events_url":"https://api.github.com/users/inger/events{/privacy}","received_events_url":"https://api.github.com/users/inger/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T11:46:24Z","updated_at":"2015-07-15T11:46:24Z","body":"BTW-  I know this awfully off-topic - but is there any new mailing list up&running yet (codehaus replacement) Thanks"}}