When multiple threads attempt to resolve an autoload definition there's nothing guarding the checks/sets for the "@loaded" and "@thread" instance variables. By using Rubinius.synchronize we can ensure that only 1 thread at a time can autoload a constant without having to worry about recursive locking.
As discussed already in #3373 some people might overwrite this in a way that's not compatible with the default behaviour. While we can't (and are not going to) guard ourselves against every possible case where somebody might've overwritten a core Ruby method, we _can_ at least in this particular case remove the dependency on Object#inspect. As an aside this now ensures that our error messages are the same as MRI's, although one could argue that this is a bit odd: class Foo end Foo.method(:bar) # => NameError: undefined method `barr' for class `Class' Instead of: Foo.method(:bar) # => NameError: undefined method `barr' for class `Foo'
RubyGems 2.4.6 installed === 2.4.6 / 2014-02-05 Bug fixes: * Fixed resolving gems with both upper and lower requirement boundaries. Issue #1141 by Jakub Jirutka. * Moved extension directory after require_paths to fix missing constant bugs in some gems with C extensions. Issue #784 by André Arko, pull request #1137 by Barry Allard. * Use Gem::Dependency#requirement when adding a dependency to an existing dependency instance. Pull request #1101 by Josh Cheek. * Fixed warning of shadowed local variable in Gem::Specification. Pull request #1109 by Rohit Arondekar * Gem::Requirement should always sort requirements before coercion to Hash. Pull request #1139 by Eito Katagiri. * The `gem open` command should change the current working directory before opening the editor. Pull request #1142 by Alex Wood. * Ensure quotes are stripped from the Windows launcher script used to install gems. Pull request #1115 by Youngjun Song. * Fixed errors when writing to NFS to to 0444 files. Issue #1161 by Emmanuel Hadoux. * Removed dead code in Gem::StreamUI. Pull request #1117 by mediaslave24. * Fixed typos. Pull request #1096 by hakeda. * Relaxed CMake dependency for RHEL 6 and CentOS 6. Pull request #1124 by Vít Ondruch. * Relaxed Psych dependency. Pull request #1128 by Vít Ondruch. === 2.4.5 / 2014-12-03 Bug fixes: * Improved speed of requiring gems. (Around 25% for a 60 gem test). Pull request #1060 by unak. * RubyGems no longer attempts to look up gems remotely with the --local flag. Pull request #1084 by Jeremy Evans. * Executable stubs use the correct gem version when RUBYGEMS_GEMDEPS is active. Issue #1072 by Michael Kaiser-Nyman. * Fixed handling of pinned gems in lockfiles with versions. Issue #1078 by Ian Ker-Seymer. * Fixed handling of git@example:gem.git URIs. Issue #1054 by Mogutan Mogu. * Fixed handling of platforms retrieved from the dependencies API. Issue #1058 and patch suggestion by tux-mind. * RubyGems now suggests a copy-pasteable `gem pristine` command when extensions are missing. Pull request #1057 by Shannon Skipper. * Improved errors for long file names when packaging. Pull request #1016 by Piotrek Bator. * `gem pristine` now skips gems cannot be found remotely. Pull request #1064 by Tuomas Kareinen. * `gem pristine` now caches gems to the proper directory. Pull request #1064 by Tuomas Kareinen. * `gem pristine` now skips bundled gems properly. Pull request #1064 by Tuomas Kareinen. * Improved interoperability of Vagrant with RubyGems. Pull request #1057 by Vít Ondruch. * Renamed CONTRIBUTING to CONTRIBUTING.rdoc to allow markup. Pull request #1090 by Roberto Miranda. * Switched from #partition to #reject as only one collection is used. Pull request #1074 by Tuomas Kareinen. * Fixed installation of gems on systems using memory-mapped files. Pull request #1038 by Justin Li. * Fixed bug in Gem::Text#min3 where `a == b < c`. Pull request #1026 by fortissimo1997. * Fixed uninitialized variable warning in BasicSpecification. Pull request #1019 by Piotr Szotkowski. * Removed unneeded exception handling for cyclic dependencies. Pull request #1043 by Jens Wille. * Fixed grouped expression warning. Pull request #1081 by André Arko. * Fixed handling of platforms when writing lockfiles. ------------------------------------------------------------------------------
Many log messages may be associated with a particular log level, but some log output (eg the command line of the process) are not necessarily associated with a log level as that is typically specified. In other words, some info should always be written to the log. It's not a matter of program 'condition' (eg warning, debug, error). The content *is* informational, but the 'info' level typically indicates something between optional and important, inclusive, and may be turned off. Because of syslog limitations, the write() output is tagged LOG_INFO.
This is the read-only version of :vm_inc_global_serial, returning the current value of the serial without modification. This is useful for implementing caches in Ruby-space that are to be invalidated when the global serial is incremented. (That is, when constants are assigned or included into modules).
The C-API rb_thread_select and rb_thread_blocking_region functions have been deprecated for a long time and finally removed in Ruby 2.2.0 (or trunk). The C-API specs for these functions were not compiling properly on 2.2.0 and the specs for rb_thread_blocking_region had serious race condition flaws. While Rubinius is not yet 2.2.0 compatible at this point and the C-API will continue to have these functions until we tick to 2.2.0 compatibility, there's no point wasting time fixing these specs.
Typical programs that log to eg /var/log are daemons or services. There is typically a single process or process group on a node. In contrast, Rubinius may be run by multiple users on a single node. Segregating the log file by user enables better control of the log file permissions.