Successfully reported this slideshow.
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
describe MailingList, '#create_message_for' do
  fixtures :mailing_lists

   before do
     @email = stub(:email)
     @me...
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
#define ARY_SET_LEN(ary, n) do { 
                    if (ARY_EMBED_P(ary)) { 
                        ARY_SET_EMBED_LEN(a...
#define ARY_SET_HEAP_LEN(ary, n) do { 
                assert(!ARY_EMBED_P(ary)); 
                RARRAY(ary)->as.heap.le...
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
define rb_classname
                  call classname($arg0)
                  rb_p $
                  print *(struct RCla...
2009   4   23
2009   4   23
2009   4   23
2009   4   23
2009   4   23
Upcoming SlideShare
Loading in …5
×

今王必欲致士 先従隗始 - little debugging principles

1,879 views

Published on

at Debug hacks conference 2009

Published in: Technology
  • Be the first to comment

  • Be the first to like this

今王必欲致士 先従隗始 - little debugging principles

  1. 1. 2009 4 23
  2. 2. 2009 4 23
  3. 3. 2009 4 23
  4. 4. 2009 4 23
  5. 5. 2009 4 23
  6. 6. 2009 4 23
  7. 7. 2009 4 23
  8. 8. 2009 4 23
  9. 9. 2009 4 23
  10. 10. 2009 4 23
  11. 11. 2009 4 23
  12. 12. 2009 4 23
  13. 13. 2009 4 23
  14. 14. 2009 4 23
  15. 15. 2009 4 23
  16. 16. 2009 4 23
  17. 17. 2009 4 23
  18. 18. 2009 4 23
  19. 19. 2009 4 23
  20. 20. 2009 4 23
  21. 21. 2009 4 23
  22. 22. 2009 4 23
  23. 23. 2009 4 23
  24. 24. 2009 4 23
  25. 25. 2009 4 23
  26. 26. 2009 4 23
  27. 27. 2009 4 23
  28. 28. 2009 4 23
  29. 29. 2009 4 23
  30. 30. 2009 4 23
  31. 31. 2009 4 23
  32. 32. 2009 4 23
  33. 33. 2009 4 23
  34. 34. 2009 4 23
  35. 35. 2009 4 23
  36. 36. 2009 4 23
  37. 37. 2009 4 23
  38. 38. 2009 4 23
  39. 39. 2009 4 23
  40. 40. 2009 4 23
  41. 41. 2009 4 23
  42. 42. 2009 4 23
  43. 43. 2009 4 23
  44. 44. 2009 4 23
  45. 45. 2009 4 23
  46. 46. 2009 4 23
  47. 47. 2009 4 23
  48. 48. 2009 4 23
  49. 49. 2009 4 23
  50. 50. 2009 4 23
  51. 51. 2009 4 23
  52. 52. 2009 4 23
  53. 53. 2009 4 23
  54. 54. 2009 4 23
  55. 55. describe MailingList, '#create_message_for' do fixtures :mailing_lists before do @email = stub(:email) @message = stub(:message) end # ... it quot;returns nil if the resolver can't resolve the email as a message for the listquot; do @resolver.stub!(:resolve).and_return(nil) @ml.create_message_for(@email).should be_nil end end 2009 4 23
  56. 56. 2009 4 23
  57. 57. 2009 4 23
  58. 58. 2009 4 23
  59. 59. 2009 4 23
  60. 60. 2009 4 23
  61. 61. 2009 4 23
  62. 62. 2009 4 23
  63. 63. 2009 4 23
  64. 64. 2009 4 23
  65. 65. 2009 4 23
  66. 66. 2009 4 23
  67. 67. 2009 4 23
  68. 68. 2009 4 23
  69. 69. 2009 4 23
  70. 70. 2009 4 23
  71. 71. 2009 4 23
  72. 72. 2009 4 23
  73. 73. 2009 4 23
  74. 74. 2009 4 23
  75. 75. 2009 4 23
  76. 76. #define ARY_SET_LEN(ary, n) do { if (ARY_EMBED_P(ary)) { ARY_SET_EMBED_LEN(ary, n); } else { ARY_SET_HEAP_LEN(ary, n); } assert(RARRAY_LEN(ary) == n); } while (0) 2009 4 23
  77. 77. #define ARY_SET_HEAP_LEN(ary, n) do { assert(!ARY_EMBED_P(ary)); RARRAY(ary)->as.heap.len = n; } while (0) 2009 4 23
  78. 78. 2009 4 23
  79. 79. 2009 4 23
  80. 80. 2009 4 23
  81. 81. 2009 4 23
  82. 82. 2009 4 23
  83. 83. 2009 4 23
  84. 84. 2009 4 23
  85. 85. 2009 4 23
  86. 86. 2009 4 23
  87. 87. 2009 4 23
  88. 88. 2009 4 23
  89. 89. 2009 4 23
  90. 90. 2009 4 23
  91. 91. 2009 4 23
  92. 92. 2009 4 23
  93. 93. 2009 4 23
  94. 94. 2009 4 23
  95. 95. 2009 4 23
  96. 96. 2009 4 23
  97. 97. 2009 4 23
  98. 98. 2009 4 23
  99. 99. 2009 4 23
  100. 100. 2009 4 23
  101. 101. define rb_classname call classname($arg0) rb_p $ print *(struct RClass*)$arg0 end # .gdbinit 2009 4 23
  102. 102. 2009 4 23
  103. 103. 2009 4 23
  104. 104. 2009 4 23
  105. 105. 2009 4 23
  106. 106. 2009 4 23

×