summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-13 09:21:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-13 09:21:18 +0000
commitcf5d04f663e9e7a61da4dda66e78097aefe66919 (patch)
tree431e5afae10458ab9e139683d74724bd713b0ed8 /ext
parent510c93caacad0911261f3adeed73b43fc5fca57f (diff)
* hash.c (rb_hash_replace): should copy ifnone.
* hash.c (rb_hash_dup): should preserve HASH_PROC_DEFAULT and HASH_DELETED flags. * hash.c (rb_hash_shift): shift from empty hash should not return its default proc. * hash.c (rb_hash_default_proc): new method. [new] * array.c (rb_ary_aref): no need for Bignum check. * array.c (rb_ary_aset): explicit Bignum check removd. * numeric.c (fix_aref): normalize bignum before bit-op. * bignum.c (rb_big_rand): max may be Bignum zero. * bignum.c (rb_cstr_to_inum): should normalize bignums, to avoid returning fixable bignum value. * bignum.c (rb_uint2big): there should be no zero sized bignum. * ext/extmk.rb.in: extmake() that works properly for both tkutil (tk/tkutil.so) and digest/sha1. * hash.c (rb_hash_equal): should check HASH_PROC_DEFAULT too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb.in17
-rw-r--r--ext/pty/lib/expect.rb4
2 files changed, 11 insertions, 10 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index a8bcafa0bf..a2f1a2cbf6 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -693,7 +693,7 @@ def extmake(target)
unless $install or $clean
if $static_ext.size > 0 ||
!File.exist?("./Makefile") ||
- older("./Makefile", "#{$top_srcdir}/ext/@setup@") ||
+ older("./Makefile", $setup) ||
older("./Makefile", "#{$topdir}/ext/extmk.rb") ||
older("./Makefile", "#{$top_srcdir}/ext/#{target}/makefile.rb") ||
older("./Makefile", "#{$top_srcdir}/ext/#{target}/extconf.rb")
@@ -708,10 +708,9 @@ def extmake(target)
end
end
end
- $static = $target if $static
if File.exist?("./Makefile")
if $static
- $extlist.push [$static, File.basename($target)]
+ $extlist.push [$static, $target, File.basename($target)]
end
if $install
if /bccwin32/ =~ RUBY_PLATFORM
@@ -731,6 +730,7 @@ def extmake(target)
end
if $static
$extlibs ||= ""
+ $extlibs += " " + $DLDFLAGS if $DLDFLAGS
$extlibs += " " + $LDFLAGS unless $LDFLAGS == ""
$extlibs += " " + $libs unless $libs == ""
$extlibs += " " + $LOCAL_LIBS unless $LOCAL_LIBS == ""
@@ -761,6 +761,7 @@ for setup in ["@setup@", "#{$top_srcdir}/ext/@setup@"]
target = target.downcase if /mswin32|bccwin32/ =~ RUBY_PLATFORM
$static_ext[target] = true
end
+ $setup = setup
f.close
break
end
@@ -797,13 +798,13 @@ miniruby = "miniruby@EXEEXT@"
$extobjs = "" unless $extobjs
if $extlist.size > 0
- for s,t in $extlist
- f = format("%s/%s.%s", s, t, $LIBEXT)
+ for s,t,i in $extlist
+ f = format("%s/%s.%s", s, i, $LIBEXT)
if File.exist?(f)
$extinit += format("\
\tInit_%s();\n\
\trb_provide(\"%s\");\n\
-", t, s)
+", i, t)
$extobjs += "ext/"
$extobjs += f
$extobjs += " "
@@ -812,7 +813,7 @@ if $extlist.size > 0
end
end
- if older("extinit.c", "#{$top_srcdir}/ext/@setup@")
+ if older("extinit.c", $setup) || older("extinit.c", "#{$topdir}/ext/extmk.rb")
f = open("extinit.c", "w")
f.printf "void Init_ext() {\n"
f.printf $extinit
@@ -827,7 +828,7 @@ if $extlist.size > 0
Dir.chdir ".."
- if older(ruby, "#{$top_srcdir}/ext/@setup@") or older(ruby, miniruby)
+ if older(ruby, $setup) or older(ruby, miniruby)
rm_f ruby
end
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb
index 5b5619e6b2..aa9ab895d3 100644
--- a/ext/pty/lib/expect.rb
+++ b/ext/pty/lib/expect.rb
@@ -20,8 +20,8 @@ class IO
STDOUT.print c
STDOUT.flush
end
- if buf =~ e_pat then
- result = [buf,$1,$2,$3,$4,$5,$6,$7,$8,$9]
+ if mat=e_pat.match(buf) then
+ result = [buf,*mat.to_a[1..-1]]
break
end
end