For JRuby 1.7.0 and 1.7.1, we shipped all of jruby-openssl and the Bouncy Castle dependency inside jruby.jar. This worked as an all- in-one setup, but failed in other ways: * With the jossl code in jruby.jar, it is impossible to update it using a gem * With BC code in jruby.jar, it is both impossible to update and it fails to work for scenarios that require signed security provider jars. The new setup builds jopenssl.jar into lib/ruby/shared, copies the bc*.jar files to lib/ruby/shared, and incorporates the bouncy-castle-java.rb file from the bouncy-castle-java gem. This allows jruby-openssl to be shipped with JRuby, outside jruby.jar to avoid those issues, and upgradable by jruby-openssl gem. We probably need to adjust dist logic for this. I'll coordinate with enebo.
For every combination of load path + filename + extension, we were using Java's File.isFile() to determine whether the file existed. We then subsequently also called canRead() to know if we could read the file. On a hunch, I modified the check to do *just* the canRead call, which should return false if the file in question does not exist, is not a file, or is not readable. The original logic made at least a stat call every time, mostly for paths that failed the test. The new logic calls access(2) (at least on BSD/Darwin) which might be cheaper (at least the call signature does not require allocating a stat-like struct; it is not clear whether it might do the same thing as stat internally). Before the change, here's dtruss counts of system calls for bench_load_path 100: access 5588 dup2 5677 close 5724 open 5733 fstat64 5862 psynch_cvsignal 6319 psynch_cvwait 7998 fcntl 11410 lseek 12439 read 18006 stat64 1163895 And here's the same run after the change: close 5760 open 5771 fstat64 5907 psynch_cvsignal 7718 psynch_cvwait 9326 fcntl 11486 stat64 11901 lseek 15162 read 20756 access 1163043
This commit is overly eager on fixing the existing files' EOLs. I also have reservations about enforcing EOL rules, and would like to discuss it a little further. This reverts commit b111911.
* Immediates (Symbol, Fixnum, Float, nil, true, false) do not need metaclass check; instanceof is enough. * GWT tests can be simplified to a single permute + insert args.
This will work automatically for future commits. For existing files, we have to manually normalize them once and only once, with following command: find . \( -path './.git' -o -path './build*' -o \ -path './src_gen' \) -prune -o -type f -print |\ xargs dos2unix One caveat of dos2unix is, even though it claims by default only convert line breaks and skip binary files, it actually depends, e.g., some UTF-16 files could be messed up; and the BOM in some UTF-8 files could be removed unexpectedly. Therefore, after running the above command, make sure to use git diff to see if there's any such kind of unexpected change, and those files can be restored via git checkout.
values may be the best way to address #215.
we should rely on the String value passed to set up the Time object.
* updated ir-scope flags to check if a scope can receive breaks or non-local returns * added stubs to generate exception handling code for IRBreakJump and IRReturnJump.
JRUBY-7017 patch by Brian Gugliemetti. Thank you!