summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-14 22:57:33 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-14 22:57:33 +0000
commit321da41379488d2cc808ecca667cf063b9c1ecea (patch)
tree539f3a812e1ee0c3ae8ff836647956678b5c3bdc /lib
parent5c9130aaa397370431b95c9354574a91d9816a4c (diff)
* ostruct.rb: fix a bug in inspect which called String#+ with Symbol.
[ruby-dev:18788] * profile.rb: illegal use of Array#sort!. replaced it with non-bang method. [ruby-dev:18792] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/ostruct.rb2
-rw-r--r--lib/profile.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index f083677d8e..a1ab5d0b4a 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -45,7 +45,7 @@ class OpenStruct
str = "<#{self.type}"
for k,v in @table
str += " "
- str += k
+ str += k.to_s
str += "="
str += v.inspect
end
diff --git a/lib/profile.rb b/lib/profile.rb
index b00caac42e..127a64f5a5 100644
--- a/lib/profile.rb
+++ b/lib/profile.rb
@@ -40,7 +40,8 @@ module Profiler__
MAP["#toplevel"][1] = total
# f = open("./rmon.out", "w")
f = STDERR
- data = MAP.values.sort!{|a,b| b[2] <=> a[2]}
+ data = MAP.values
+ data.sort!{|a,b| b[2] <=> a[2]}
sum = 0
f.printf " %% cumulative self self total\n"
f.printf " time seconds seconds calls ms/call ms/call name\n"