summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--test/ruby/test_backtrace.rb8
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 25fadc70d7..cd370918b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Dec 1 21:18:19 2012 Koichi Sasada <ko1@atdot.net>
+
+ * test/ruby/test_backtrace.rb: add a test for
+ Thread::Backtrace::Location#inspect.
+ BTW, tests for `caller_locations' are not enough.
+ Any volunteers are welcome.
+
Sat Dec 1 21:06:58 2012 Koichi Sasada <ko1@atdot.net>
* vm_backtrace.c (location_inspect_m): add
diff --git a/test/ruby/test_backtrace.rb b/test/ruby/test_backtrace.rb
index ebbde9f060..bd65e40036 100644
--- a/test/ruby/test_backtrace.rb
+++ b/test/ruby/test_backtrace.rb
@@ -92,6 +92,14 @@ class TestBacktrace < Test::Unit::TestCase
assert_equal(cs, locs)
end
+ def test_caller_locations_to_s_inspect
+ cs = caller(0); locs = caller_locations(0)
+ cs.zip(locs){|str, loc|
+ assert_equal(str, loc.to_s)
+ assert_equal(str.inspect, loc.inspect)
+ }
+ end
+
def th_rec q, n=10
if n > 1
th_rec q, n-1