[前][次][番号順一覧][スレッド一覧]

ruby-changes:29296

From: zzak <ko1@a...>
Date: Mon, 17 Jun 2013 14:31:38 +0900 (JST)
Subject: [ruby-changes:29296] zzak:r41348 (trunk): * vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1

zzak	2013-06-17 14:31:28 +0900 (Mon, 17 Jun 2013)

  New Revision: 41348

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41348

  Log:
    * vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1

  Modified files:
    trunk/ChangeLog
    trunk/vm_backtrace.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41347)
+++ ChangeLog	(revision 41348)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun 17 14:27:54 2013  Zachary Scott  <zachary@z...>
+
+	* vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1
+
 Mon Jun 17 13:04:01 2013  Akinori MUSHA  <knu@i...>
 
 	* tool/ifchange (until): Fix the condition, although harmless in
Index: vm_backtrace.c
===================================================================
--- vm_backtrace.c	(revision 41347)
+++ vm_backtrace.c	(revision 41348)
@@ -177,10 +177,27 @@ location_label(rb_backtrace_location_t * https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L177
  *
  * Usually consists of method, class, module, etc names with decoration.
  *
- * For example, using +caller_locations.rb+ from Thread::Backtrace::Location
+ * Consider the following example:
+ *
+ *	def foo
+ *	  puts caller_locations(0).first.label
+ *
+ *	  1.times do
+ *	    puts caller_locations(0).first.label
+ *
+ *	    1.times do
+ *	      puts caller_locations(0).first.label
+ *	    end
+ *
+ *	  end
+ *	end
+ *
+ * The result of calling +foo+ is this:
+ *
+ *	label: foo
+ *	label: block in foo
+ *	label: block (2 levels) in foo
  *
- *	loc = c(0..1).first
- *	loc.label #=> a
  */
 static VALUE
 location_label_m(VALUE self)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]