summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-17 16:00:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-17 16:00:23 +0000
commit48dcf7ad36c88be62d6b2d06eed44b4045523b45 (patch)
treed174e1c1da894e1b62b96ede899680931f74b167
parentffe229399843b3ddb86511c0627e208e989efc49 (diff)
* lib/mathn.rb (Rational::inspect): should preserve original
operand. [ruby-core:05806] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--lib/cgi.rb1
-rw-r--r--lib/mathn.rb5
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 797a1ee5f6..84768b5b47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
+Sat Sep 17 23:25:04 2005 sheepman <sheepman@sheepman.sakura.ne.jp>
+
+ * lib/mathn.rb (Rational::inspect): should preserve original
+ operand. [ruby-core:05806]
+
Sat Sep 17 23:20:27 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * lib/cgi.rb (CGI::Cookie): should handle multiple values for a
+ cookie name. [ruby-talk:156140]
+
* test/socket/test_tcp.rb (TestTCPSocket::test_recvfrom): typo
fixed. [ruby-dev:27123]
diff --git a/lib/cgi.rb b/lib/cgi.rb
index fc16ead671..1f5a3b0701 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -883,7 +883,6 @@ class CGI
raw_cookie.split(/[;,] /).each do |pairs|
name, values = pairs.split('=',2)
next unless name and values
- p [name, values]
name = CGI::unescape(name)
values ||= ""
values = values.split('&').collect{|v| CGI::unescape(v) }
diff --git a/lib/mathn.rb b/lib/mathn.rb
index ba8557cffc..19325f2996 100644
--- a/lib/mathn.rb
+++ b/lib/mathn.rb
@@ -135,6 +135,7 @@ class Rational
def ** (other)
if other.kind_of?(Rational)
+ other2 = other
if self < 0
return Complex.new!(self, 0) ** other
elsif other == 0
@@ -155,7 +156,7 @@ class Rational
for elm in npd
elm[1] = elm[1] * other
if !elm[1].kind_of?(Integer) and elm[1].denominator != 1
- return Float(self) ** other
+ return Float(self) ** other2
end
elm[1] = elm[1].to_i
end
@@ -163,7 +164,7 @@ class Rational
for elm in dpd
elm[1] = elm[1] * other
if !elm[1].kind_of?(Integer) and elm[1].denominator != 1
- return Float(self) ** other
+ return Float(self) ** other2
end
elm[1] = elm[1].to_i
end