Ok, I updated all 1.8.7 stdlib from the fork and updated the patchlevel we report. Thank you!
- Charlie On Fri, Nov 18, 2011 at 12:18 AM, Hiroshi Nakamura <n...@ruby-lang.org> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > (2011/11/18 8:57), Charles Oliver Nutter wrote: >> There seems to be some differences between what we ship on master >> for 1.8.7 stdlib and what we have in the jruby "ruby" fork's >> branch jruby-1_8_7: >> >> https://gist.github.com/1374961 >> >> I'm not sure which of these changes should remain in place in >> stdlib and which should be overwritten by jruby-ruby_1_8_7's >> copy.... > > My comments below. > >> diff --git a/lib/ruby/1.8/fileutils.rb b/lib/ruby/1.8/fileutils.rb >> index b3583e3..795cde9 100644 --- a/lib/ruby/1.8/fileutils.rb +++ >> b/lib/ruby/1.8/fileutils.rb @@ -1027,7 +1027,7 @@ module FileUtils >> created = nocreate = options[:nocreate] t = options[:mtime] if >> options[:verbose] - fu_output_message "touch #{nocreate ? ' -c' : >> ''}#{t ? t.strftime(' -t %Y%m%d%H%M.%S') : ''}#{list.join ' '}" + >> fu_output_message "touch #{nocreate ? '-c ' : ''}#{t ? >> t.strftime('-t %Y%m%d%H%M.%S ') : ''}#{list.join ' '}" end return >> if options[:noop] list.each do |path| > > Should be updated with jruby's fork. Old one should be from 1.8.6's > stdlib. > >> diff --git a/lib/ruby/1.8/logger.rb b/lib/ruby/1.8/logger.rb index >> d5f5425..25553b2 100644 --- a/lib/ruby/1.8/logger.rb +++ >> b/lib/ruby/1.8/logger.rb @@ -170,8 +170,7 @@ require 'monitor' >> >> class Logger VERSION = "1.2.6" - # this is faked to avoid the svn >> ID changing with every update - ProgName = "logger.rb/99999" + >> ProgName = "#{File.basename(__FILE__)}/#{VERSION}" >> >> class Error < RuntimeError; end class ShiftingError < Error; end > > Please update. That's what I've changed jruby's fork to sync with the > upstream version yesterday. > >> diff --git a/lib/ruby/1.8/securerandom.rb >> b/lib/ruby/1.8/securerandom.rb index 3fd63e5..a957687 100644 --- >> a/lib/ruby/1.8/securerandom.rb +++ b/lib/ruby/1.8/securerandom.rb >> @@ -50,6 +50,14 @@ module SecureRandom def >> self.random_bytes(n=nil) n ||= 16 if defined? OpenSSL::Random + >> @pid = $$ if !defined?(@pid) + pid = $$ + if @pid != pid + now = >> Time.now + ary = [now.to_i, now.usec, @pid, pid] + >> OpenSSL::Random.seed(ary.to_s) + @pid = pid + end return >> OpenSSL::Random.random_bytes(n) end if !defined?(@has_urandom) || >> @has_urandom > > It's safe to update since lib/ruby/1.8/securerandom.rb is not used in > JRuby. We use lib/ruby/site_ruby/shared/securerandom.rb which uses > our Java based random_bytes instead. > >> diff --git a/lib/ruby/1.8/uri/generic.rb >> b/lib/ruby/1.8/uri/generic.rb index c855d60..a4b3585 100644 --- >> a/lib/ruby/1.8/uri/generic.rb +++ b/lib/ruby/1.8/uri/generic.rb @@ >> -799,30 +799,26 @@ module URI private :merge0 >> >> def route_from_path(src, dst) - # RFC2396, Section 4.2 - return '' >> if src == dst - - src_path = split_path(src) - dst_path = >> split_path(dst) - - # hmm... dst has abnormal absolute path, - # >> like "/./", "/../", "/x/../", ... - if dst_path.include?('..') || - >> dst_path.include?('.') + case dst + when src + # RFC2396, Section >> 4.2 + return '' + when %r{(?:\A|/)\.\.?(?:/|\z)} + # dst has >> abnormal absolute path, + # like "/./", "/../", "/x/../", ... >> return dst.dup end >> >> - src_path.pop + src_path = src.scan(%r{(?:\A|[^/]+)/}) + dst_path >> = dst.scan(%r{(?:\A|[^/]+)/?}) >> >> # discard same parts - while dst_path.first == src_path.first - >> break if dst_path.empty? - + while !dst_path.empty? && >> dst_path.first == src_path.first src_path.shift dst_path.shift end >> >> - tmp = dst_path.join('/') + tmp = dst_path.join >> >> # calculate if src_path.empty? > > Should be updated with jruby's fork. Old one should be from 1.8.6's > stdlib. > >> diff --git a/lib/ruby/1.8/webrick/accesslog.rb >> b/lib/ruby/1.8/webrick/accesslog.rb index 75a3a3e..0bed809 100644 >> --- a/lib/ruby/1.8/webrick/accesslog.rb +++ >> b/lib/ruby/1.8/webrick/accesslog.rb @@ -53,7 +53,7 @@ module >> WEBrick when ?e, ?i, ?n, ?o raise AccessLogError, "parameter is >> required for \"#{spec}\"" unless param - param = >> params[spec][param] ? escape(param) : "-" + (param = >> params[spec][param]) ? escape(param) : "-" when ?t >> params[spec].strftime(param || CLF_TIME_FORMAT) when ?% > > Must be updated. CRuby fixed this in 1.8.7. It's a bug from > confusing operator priorities... > > // NaHi > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (Cygwin) > > iQEcBAEBAgAGBQJOxfjGAAoJEC7N6P3yLbI2RhkH/Amd8JGn2CSjHNTABP+TR7QT > /McSjMakcObGAfSeUaHWq3fomRyDFCBHBjmHu06x+42u0U5nsvFyZCz85YAuZITa > daulKvAO+uj9kG6IX6H4AScGvi3I857L2/YWdyJoBjki1SHr2dxJPpaO4HPZ/MlF > aoJyPOFZ0AKk6bjVqnRcFlq76NZl8Ge2rrgMELYDq2gSiYMyKRmJ4v4ecglpT+Nc > n6BERXYQlZKDWNs3A4bfEvFEaMcg0LEIKAm3gYR1GVPvoviZdl7jf1rqPwN2J8th > lLxxovqIiMQI9yxaRDhGo49J68ajZ+ZnSoS77oxClgWWKFJyeAlFGF7tNzJGTos= > =+ki2 > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email