summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-24 04:34:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-24 04:34:26 +0000
commit8b1de0b1ad49733abeddd8be359ae816b29de59a (patch)
treea7ed03dd3f6442635f694c4367bcd94be57f6dbd /ext
parent24b9bdca25dc431aff935df7739b9c5ea0ee4077 (diff)
2000-05-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dbm/dbm.c2
-rw-r--r--ext/etc/etc.c4
-rw-r--r--ext/extmk.rb.in18
-rw-r--r--ext/gdbm/gdbm.c2
-rw-r--r--ext/md5/MANIFEST1
-rw-r--r--ext/pty/pty.c2
-rw-r--r--ext/sdbm/init.c2
-rw-r--r--ext/tcltklib/extconf.rb2
-rw-r--r--ext/tk/lib/tk.rb6
-rw-r--r--ext/tk/lib/tkafter.rb2
-rw-r--r--ext/tk/lib/tkcanvas.rb11
-rw-r--r--ext/tk/lib/tktext.rb6
-rw-r--r--ext/tk/lib/tkvirtevent.rb6
-rw-r--r--ext/tk/tkutil.c2
14 files changed, 19 insertions, 47 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index 66b41d03c1..c956684757 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -162,7 +162,7 @@ fdbm_delete(obj, keystr)
value = dbm_fetch(dbm, key);
if (value.dptr == 0) {
- if (rb_iterator_p()) rb_yield(keystr);
+ if (rb_block_given_p()) rb_yield(keystr);
return Qnil;
}
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 049b94ec8f..ee0cd529e4 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -133,7 +133,7 @@ etc_passwd(obj)
#ifdef HAVE_GETPWENT
struct passwd *pw;
- if (rb_iterator_p()) {
+ if (rb_block_given_p()) {
setpwent();
while (pw = getpwent()) {
rb_yield(setup_passwd(pw));
@@ -210,7 +210,7 @@ etc_group(obj)
#ifdef HAVE_GETGRENT
struct group *grp;
- if (rb_iterator_p()) {
+ if (rb_block_given_p()) {
setgrent();
while (grp = getgrent()) {
rb_yield(setup_group(grp));
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 97152065c4..0787ae4658 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -334,11 +334,6 @@ def create_makefile(target)
$DLDFLAGS = $DLDFLAGS + " -L" + $topdir
end
- if RUBY_PLATFORM =~ /beos/ and not $static
- $libs = $libs + " @LIBRUBYARG@"
- $DLDFLAGS = $DLDFLAGS + " -L" + $topdir
- end
-
defflag = ''
if RUBY_PLATFORM =~ /cygwin|mingw/ and not $static
if File.exist? target + ".def"
@@ -477,19 +472,6 @@ $(DLLIB): $(OBJS)
dfile.close
end
mfile.close
-
- if RUBY_PLATFORM =~ /beos/
- if RUBY_PLATFORM =~ /^powerpc/ then
- deffilename = "ruby.exp"
- else
- deffilename = "ruby.def"
- end
- print "creating #{deffilename}\n"
- open(deffilename, "w") do |file|
- file.print("EXPORTS\n") if RUBY_PLATFORM =~ /^i/
- file.print("Init_#{target}\n")
- end
- end
end
def extmake(target)
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index 3c1ef88adf..044a9908b6 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -159,7 +159,7 @@ fgdbm_delete(obj, keystr)
value = gdbm_fetch(dbm, key);
if (value.dptr == 0) {
- if (rb_iterator_p()) rb_yield(keystr);
+ if (rb_block_given_p()) rb_yield(keystr);
return Qnil;
}
diff --git a/ext/md5/MANIFEST b/ext/md5/MANIFEST
index 8057ebb06c..189a482afb 100644
--- a/ext/md5/MANIFEST
+++ b/ext/md5/MANIFEST
@@ -1,5 +1,6 @@
MANIFEST
depend
+extconf.rb
md5.txt
md5.txt.jp
md5.h
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index b8c4e9acae..52257b0560 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -457,7 +457,7 @@ pty_getpty(self, shell)
rb_ary_store(res,1,(VALUE)wport);
rb_ary_store(res,2,INT2FIX(info.child_pid));
- if (rb_iterator_p()) {
+ if (rb_block_given_p()) {
rb_yield((VALUE)res);
reset_signal_action();
return Qnil;
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index b28b8e3ad2..1e1d5a5868 100644
--- a/ext/sdbm/init.c
+++ b/ext/sdbm/init.c
@@ -156,7 +156,7 @@ fsdbm_delete(obj, keystr)
value = sdbm_fetch(dbm, key);
if (value.dptr == 0) {
- if (rb_iterator_p()) rb_yield(keystr);
+ if (rb_block_given_p()) rb_yield(keystr);
return Qnil;
}
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb
index 70a765a0b9..5f56d42a52 100644
--- a/ext/tcltklib/extconf.rb
+++ b/ext/tcltklib/extconf.rb
@@ -23,6 +23,7 @@ def find_tcl(tcllib)
find_library(tcllib, func, *paths)
else
find_library("tcl", func, *paths) or
+ find_library("tcl8.3", func, *paths) or
find_library("tcl8.2", func, *paths) or
find_library("tcl8.0", func, *paths) or
find_library("tcl7.6", func, *paths)
@@ -36,6 +37,7 @@ def find_tk(tklib)
find_library(tklib, func, *paths)
else
find_library("tk", func, *paths) or
+ find_library("tk8.3", func, *paths) or
find_library("tk8.2", func, *paths) or
find_library("tk8.0", func, *paths) or
find_library("tk4.2", func, *paths)
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 6dd832b942..bb3f7f6ab8 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -470,7 +470,7 @@ module TkCore
end
def rb_appsend(interp, async, *args)
- args = args.filter{|c| _get_eval_string(c).gsub(/[][$"]/, '\\\\\&')}
+ args = args.collect!{|c| _get_eval_string(c).gsub(/[][$"]/, '\\\\\&')}
args.push(').to_s"')
appsend(interp, async, 'ruby "(', *args)
end
@@ -485,7 +485,7 @@ module TkCore
end
def rb_appsend_displayof(interp, win, async, *args)
- args = args.filter{|c| _get_eval_string(c).gsub(/[][$"]/, '\\\\\&')}
+ args = args.collect!{|c| _get_eval_string(c).gsub(/[][$"]/, '\\\\\&')}
args.push(').to_s"')
appsend_displayof(interp, win, async, 'ruby "(', *args)
end
@@ -526,7 +526,7 @@ module TkCore
def tk_call(*args)
print args.join(" "), "\n" if $DEBUG
- args.filter {|x|_get_eval_string(x)}
+ args.collect! {|x|_get_eval_string(x)}
args.compact!
args.flatten!
begin
diff --git a/ext/tk/lib/tkafter.rb b/ext/tk/lib/tkafter.rb
index be2e50ff3a..55bfde4d52 100644
--- a/ext/tk/lib/tkafter.rb
+++ b/ext/tk/lib/tkafter.rb
@@ -26,7 +26,7 @@ class TkAfter
end
def TkAfter.info
- tk_call('after', 'info').split(' ').filter{|id|
+ tk_call('after', 'info').split(' ').collect!{|id|
ret = Tk_CBTBL.find{|key,val| val.after_id == id}
(ret == nil)? id: ret[1]
}
diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb
index 80c36f6ed8..914bfe01e3 100644
--- a/ext/tk/lib/tkcanvas.rb
+++ b/ext/tk/lib/tkcanvas.rb
@@ -216,7 +216,7 @@ class TkCanvas<TkWindow
end
def find(mode, *args)
- list(tk_send 'find', mode, *args).filter{|id|
+ list(tk_send 'find', mode, *args).collect!{|id|
TkcItem.id2obj(id)
}
end
@@ -368,13 +368,6 @@ class TkCanvas<TkWindow
def itemtype(tag)
TkcItem.type2class(tk_send 'type', tagid(tag))
end
-
- def xview(*index)
- tk_send 'xview', *index
- end
- def yview(*index)
- tk_send 'yview', *index
- end
end
module TkcTagAccess
@@ -725,7 +718,7 @@ class TkImage<TkObject
end
def TkImage.names
- Tk.tk_call('image', 'names').split.filter{|id|
+ Tk.tk_call('image', 'names').split.collect!{|id|
(Tk_IMGTBL[id])? Tk_IMGTBL[id] : id
}
end
diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb
index 2b5fb9138e..163583f139 100644
--- a/ext/tk/lib/tktext.rb
+++ b/ext/tk/lib/tktext.rb
@@ -245,16 +245,10 @@ class TkText<TkTextWin
(inf == "")? [0,0,0,0,0]: inf
end
- def yview(*what)
- tk_send 'yview', *what
- end
def yview_pickplace(*what)
tk_send 'yview', '-pickplace', *what
end
- def xview(*what)
- tk_send 'xview', *what
- end
def xview_pickplace(*what)
tk_send 'xview', '-pickplace', *what
end
diff --git a/ext/tk/lib/tkvirtevent.rb b/ext/tk/lib/tkvirtevent.rb
index 0d100c2186..b31b99062f 100644
--- a/ext/tk/lib/tkvirtevent.rb
+++ b/ext/tk/lib/tkvirtevent.rb
@@ -16,7 +16,7 @@ class TkVirtualEvent<TkObject
end
def TkVirtualEvent.info
- tk_call('event', 'info').split(/\s+/).filter{|seq|
+ tk_call('event', 'info').split(/\s+/).collect!{|seq|
TkVirtualEvent.getobj(seq[1..-2])
}
end
@@ -49,8 +49,8 @@ class TkVirtualEvent<TkObject
end
def info
- tk_call('event', 'info', "<#{@id}>").split(/\s+/).filter{|seq|
- l = seq.scan(/<*[^<>]+>*/).filter{|subseq|
+ tk_call('event', 'info', "<#{@id}>").split(/\s+/).collect!{|seq|
+ l = seq.scan(/<*[^<>]+>*/).collect!{|subseq|
case (subseq)
when /^<<[^<>]+>>$/
TkVirtualEvent.getobj(subseq[1..-2])
diff --git a/ext/tk/tkutil.c b/ext/tk/tkutil.c
index 9d4ca0a9d0..6cfdad973b 100644
--- a/ext/tk/tkutil.c
+++ b/ext/tk/tkutil.c
@@ -29,7 +29,7 @@ tk_s_new(argc, argv, klass)
{
VALUE obj = rb_class_new_instance(argc, argv, klass);
- if (rb_iterator_p()) rb_obj_instance_eval(0, 0, obj);
+ if (rb_block_given_p()) rb_obj_instance_eval(0, 0, obj);
return obj;
}