1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

990918-repack

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1999-09-18 04:48:51 +00:00
parent 12494013d2
commit 7152df6b9b
11 changed files with 107 additions and 74 deletions

View file

@ -1,7 +1,16 @@
Fri Sep 17 01:04:25 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
Sat Sep 18 13:45:43 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* stable version 1.4.2 released.
Fri Sep 17 23:24:17 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
* eval.c (rb_f_missing): dumped core if no argument given.
Fri Sep 17 23:21:06 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
* win32/win32.c (myselect): translate WSAEINTR, WSAENOTSOCK into
UNIX errno constants.
Fri Sep 17 00:52:27 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* parse.y (arg): assignable() may return 0.

2
README
View file

@ -36,7 +36,7 @@ You can get it by anonymous CVS. How to check out is:
There is a mailing list to talk about Ruby.
To subscribe this list, please send the following phrase
subscribe Your-Last-Name Your-First-Name
subscribe YourFirstName YourFamilyName
e.g.
subscribe Joseph Smith

2
eval.c
View file

@ -3592,6 +3592,8 @@ rb_f_missing(argc, argv, obj)
char *file = ruby_sourcefile;
int line = ruby_sourceline;
if (argc == 0) rb_raise(rb_eArgError, "no id given");
id = FIX2INT(argv[0]);
argc--; argv++;

View file

@ -177,7 +177,7 @@ module Exception2MessageMapper
def E2MM.e2mm_message(klass, exp)
for c in klass.ancestors
if mes = @MessageMap[[c,exp]]
p mes
#p mes
m = klass.instance_eval('"' + mes + '"')
return m
end

View file

@ -104,7 +104,7 @@ class String
self.gsub!(pattern, last)
else
h = HashCache[from + "::" + to] ||= expand_ch_hash(from, to)
self.gsub!(pattern) do |c| p [c,h[c]]; h[c] end
self.gsub!(pattern) do |c| h[c] end
end
end

View file

@ -1,11 +1,11 @@
=begin
$Date: 1999/09/14 23:09:05 $
$Date: 1999/09/17 17:41:41 $
== SIMPLE TELNET CLIANT LIBRARY
telnet.rb
Version 0.30
Version 0.40
Wakou Aoyama <wakou@fsinet.or.jp>
@ -154,6 +154,12 @@ of cource, set sync=true or flush is necessary.
== HISTORY
=== Version 0.40
1999/09/17 17:41:41
- bug fix: preprocess method
=== Version 0.30
1999/09/14 23:09:05
@ -392,8 +398,8 @@ class Telnet < SimpleDelegator
EOL = CR + LF
v = $-v
$-v = false
VERSION = "0.30"
RELEASE_DATE = "$Date: 1999/09/14 23:09:05 $"
VERSION = "0.40"
RELEASE_DATE = "$Date: 1999/09/17 17:41:41 $"
$-v = v
def initialize(options)
@ -488,53 +494,47 @@ $-v = v
# combine EOL into "\n"
str.gsub!(/#{EOL}/no, "\n") unless @options["Binmode"]
# respond to "IAC DO x"
str.gsub!(/([^#{IAC}]?)#{IAC}#{DO}([#{OPT_BINARY}-#{OPT_NEW_ENVIRON}#{OPT_EXOPL}])/no){
if OPT_BINARY == $2
str.gsub!(/#{IAC}(
#{IAC}|
#{AYT}|
[#{DO}#{DONT}#{WILL}#{WONT}]
[#{OPT_BINARY}-#{OPT_NEW_ENVIRON}#{OPT_EXOPL}]
)/xno){
if IAC == $1 # handle escaped IAC characters
IAC
elsif AYT == $1 # respond to "IAC AYT" (are you there)
@sock.write("nobody here but us pigeons" + EOL)
''
elsif DO[0] == $1[0] # respond to "IAC DO x"
if OPT_BINARY[0] == $1[1]
@telnet_option["BINARY"] = true
@sock.write(IAC + WILL + OPT_BINARY)
else
@sock.write(IAC + WONT + $2)
@sock.write(IAC + WONT + $1[1..1])
end
$1
}
# respond to "IAC DON'T x" with "IAC WON'T x"
str.gsub!(/([^#{IAC}]?)#{IAC}#{DONT}([#{OPT_BINARY}-#{OPT_NEW_ENVIRON}#{OPT_EXOPL}])/no){
@sock.write(IAC + WONT + $2)
$1
}
# respond to "IAC WILL x"
str.gsub!(/([^#{IAC}]?)#{IAC}#{WILL}([#{OPT_BINARY}-#{OPT_NEW_ENVIRON}#{OPT_EXOPL}])/no){
if OPT_ECHO == $2
''
elsif DONT[0] == $1[0] # respond to "IAC DON'T x" with "IAC WON'T x"
@sock.write(IAC + WONT + $1[1..1])
''
elsif WILL[0] == $1[0] # respond to "IAC WILL x"
if OPT_ECHO[0] == $1[1]
@sock.write(IAC + DO + OPT_ECHO)
elsif OPT_SGA == $2
elsif OPT_SGA[0] == $1[1]
@telnet_option["SGA"] = true
@sock.write(IAC + DO + OPT_SGA)
end
$1
}
# respond to "IAC WON'T x"
str.gsub!(/([^#{IAC}]?)#{IAC}#{WONT}([#{OPT_BINARY}-#{OPT_NEW_ENVIRON}#{OPT_EXOPL}])/no){
if OPT_ECHO == $2
''
elsif WONT[0] == $1[0] # respond to "IAC WON'T x"
if OPT_ECHO[0] == $1[1]
@sock.write(IAC + DONT + OPT_ECHO)
elsif OPT_SGA == $2
elsif OPT_SGA[0] == $1[1]
@telnet_option["SGA"] = false
@sock.write(IAC + DONT + OPT_SGA)
end
$1
''
end
}
# respond to "IAC AYT" (are you there)
str.gsub!(/([^#{IAC}]?)#{IAC}#{AYT}/no){
@sock.write("nobody here but us pigeons" + EOL)
$1
}
str.gsub!(/#{IAC}#{IAC}/no, IAC) # handle escaped IAC characters
str
end # preprocess

View file

@ -2186,7 +2186,7 @@ re_compile_pattern(pattern, size, bufp)
pending_exact = b;
BUFPUSH(0);
}
if (had_num_literal && current_mbctype) {
if (had_num_literal || c == 0xff) {
BUFPUSH(0xff);
(*pending_exact)++;
had_num_literal = 0;

4
ruby.1
View file

@ -49,10 +49,10 @@ ruby - Interpreted object-oriented scripting language
.BI -x "[directory]"\c
] [ \c
.BI -X "directory"\c
] [ \c
.BI -y \c
]
[ \c
.BI -y \c
] [ \c
.BI -- \c
] [ programfile ] [ argument ] ...

View file

@ -1,12 +1,25 @@
#! /usr/local/bin/ruby
# goodfriday.rb: Written by Tadayoshi Funaba 1998
# $Id: goodfriday.rb,v 1.3 1999/08/04 14:54:18 tadf Exp $
# $Id: goodfriday.rb,v 1.1 1998/03/08 09:44:44 tadf Exp $
require 'date2'
require 'holiday'
es = Date.easter(Date.today.year)
def easter(y)
g = (y % 19) + 1
c = (y / 100) + 1
x = (3 * c / 4) - 12
z = ((8 * c + 5) / 25) - 5
d = (5 * y / 4) - x - 10
e = (11 * g + 20 + z - x) % 30
e += 1 if e == 25 and g > 11 or e == 24
n = 44 - e
n += 30 if n < 21
n = n + 7 - ((d + n) % 7)
if n <= 31 then [y, 3, n] else [y, 4, n - 31] end
end
es = Date.new3(*easter(Time.now.year))
[[-9*7, 'Septuagesima Sunday'],
[-8*7, 'Sexagesima Sunday'],
[-7*7, 'Quinquagesima Sunday (Shrove Sunday)'],

View file

@ -1,4 +1,4 @@
#define RUBY_VERSION "1.4.2"
#define RUBY_RELEASE_DATE "1999-09-17"
#define RUBY_RELEASE_DATE "1999-09-18"
#define RUBY_VERSION_CODE 142
#define RUBY_RELEASE_CODE 19990917
#define RUBY_RELEASE_CODE 19990918

View file

@ -1828,8 +1828,17 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
if (!NtSocketsInitialized++) {
StartSockets();
}
if ((r = select (nfds, rd, wr, ex, timeout)) == SOCKET_ERROR)
if ((r = select (nfds, rd, wr, ex, timeout)) == SOCKET_ERROR) {
errno = WSAGetLastError();
switch (errno) {
case WSAEINTR:
errno = EINTR;
break;
case WSAENOTSOCK:
errno = EBADF;
break;
}
}
return r;
}