From 0dbe4950441278ecb65a2da5b8cadb652ca48f7f Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 3 Sep 2006 06:34:13 +0000 Subject: [PATCH] * lib/mkmf.rb: get rid of nil.to_s. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++-- lib/mkmf.rb | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a5dc2afa4..49b0d11c3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Sep 3 15:32:44 2006 Nobuyoshi Nakada + + * lib/mkmf.rb: get rid of nil.to_s. + Sun Sep 3 06:24:38 2006 Tanaka Akira * ext/socket/socket.c (ruby_connect): sockerrlen should be socklen_t. @@ -27,7 +31,7 @@ Sat Sep 2 23:53:28 2006 Yukihiro Matsumoto * parse.y (rb_intern2): handle symbol as strings. * string.c (str_new): substring of symbols are mere strings, not - symbols. + symbols. Sat Sep 2 23:37:29 2006 Yukihiro Matsumoto @@ -36,7 +40,7 @@ Sat Sep 2 23:37:29 2006 Yukihiro Matsumoto (RARRAY_PTR): ditto. * array.c: use RARRAY_LEN and RARRAY_PTR. - + Sat Sep 2 13:23:01 2006 Tanaka Akira * common.mk (ia64.o): use the compiler driver to assemble ia64.s diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 173c1981c2..a09d8d7cab 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -536,7 +536,7 @@ end def checking_for(m, fmt = nil) f = caller[0][/in `(.*)'$/, 1] and f << ": " #` for vim - m = "checking #{'for ' if /\Acheck/ !~ f}#{m}... " + m = "checking #{/\Acheck/ =~ f ? '' : 'for '}#{m}... " message "%s", m a = r = nil Logging::postpone do @@ -1099,7 +1099,7 @@ COPY = #{config_string('CP') || '@$(RUBY) -run -e cp -- -v'} #### End of system configuration section. #### -preload = #{$preload.join(" ") if $preload} +preload = #{$preload ? $preload.join(' ') : ''} } if $nmake == ?b mk.each do |x| @@ -1456,7 +1456,7 @@ MESSAGE def mkmf_failed(path) unless $makefile_created or File.exist?("Makefile") - opts = $arg_config.collect {|t, n| "\t#{t}#{"=#{n}" if n}\n"} + opts = $arg_config.collect {|t, n| "\t#{t}#{n ? "=#{n}" : ""}\n"} abort "*** #{path} failed ***\n" + FailedMessage + opts.join end end @@ -1502,7 +1502,7 @@ end config_string('COMMON_HEADERS') do |s| Shellwords.shellwords(s).each {|s| hdr << "#include <#{s}>"} end -COMMON_HEADERS = if hdr.empty? then "" else hdr.join("\n") end +COMMON_HEADERS = hdr.join("\n") COMMON_LIBS = config_string('COMMON_LIBS', &split) || [] COMPILE_RULES = config_string('COMPILE_RULES', &split) || %w[.%s.%s:]