diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-03-23 15:38:44 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-03-23 15:38:44 +0000 |
| commit | 914393e4d30b3dd8d82777a29ced6815213d6b00 (patch) | |
| tree | 598ab90f70379273988826959ec3399bb4bf41c2 /lib | |
| parent | 5fa84237b0235dbc2eb0ceae23c398c1332f1849 (diff) | |
| download | ruby-914393e4d30b3dd8d82777a29ced6815213d6b00.tar.gz ruby-914393e4d30b3dd8d82777a29ced6815213d6b00.tar.xz ruby-914393e4d30b3dd8d82777a29ced6815213d6b00.zip | |
* io.c (rb_io_fread): may lose data on nonblocking read.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/complex.rb | 14 | ||||
| -rw-r--r-- | lib/jcode.rb | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/complex.rb b/lib/complex.rb index 98af310d3..dda2ad200 100644 --- a/lib/complex.rb +++ b/lib/complex.rb @@ -407,9 +407,7 @@ end class Fixnum - if not defined? Rational - alias power! ** - end + alias power! ** # Redefined to handle a Complex argument. def ** (other) @@ -430,9 +428,7 @@ class Fixnum end class Bignum - if not defined? Rational - alias power! ** - end + alias power! ** end class Float @@ -459,7 +455,11 @@ module Math Complex(0,sqrt!(-z)) end else - z**Rational(1,2) + if defined? Rational + z**Rational(1,2) + else + z**0.5 + end end end diff --git a/lib/jcode.rb b/lib/jcode.rb index e0a2a99fc..ab6ab6070 100644 --- a/lib/jcode.rb +++ b/lib/jcode.rb @@ -59,13 +59,13 @@ class String def end_regexp case $KCODE[0] when ?s, ?S - /#{PATTERN_SJIS}$/o + /#{PATTERN_SJIS}$/on when ?e, ?E - /#{PATTERN_EUC}$/o + /#{PATTERN_EUC}$/on when ?u, ?U - /#{PATTERN_UTF8}$/o + /#{PATTERN_UTF8}$/on else - /.$/o + /.$/on end end |
