{"id":533542,"date":"2024-12-06T09:55:18","date_gmt":"2024-12-06T08:55:18","guid":{"rendered":"https:\/\/blog.jetbrains.com\/ruby\/2024\/12\/mastering_ruby_debugging\/"},"modified":"2024-12-24T08:54:04","modified_gmt":"2024-12-24T07:54:04","slug":"mastering_ruby_debugging","status":"publish","type":"ruby","link":"https:\/\/blog.jetbrains.com\/ja\/ruby\/2024\/12\/mastering_ruby_debugging\/","title":{"rendered":"Ruby \u30c7\u30d0\u30c3\u30b0\u5b8c\u5168\u30ac\u30a4\u30c9 | puts \u304b\u3089\u9ad8\u5ea6\u306a\u30c4\u30fc\u30eb\u307e\u3067\u5fb9\u5e95\u89e3\u8aac"},"content":{"rendered":"<p>Ruby \u958b\u767a\u8005\u306e\u7686\u3055\u3093\u3001\u3053\u3093\u306b\u3061\u306f\uff01<\/p>\n<p>\u30c7\u30d0\u30c3\u30b0\u306f\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u306b\u6b20\u304b\u305b\u306a\u3044\u30b9\u30ad\u30eb\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f Ruby \u30b3\u30fc\u30c9\u306e\u52d5\u4f5c\u3092\u8abf\u3079\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u53d6\u308a\u4e0a\u3052\u307e\u3059\u3002 RubyMine \u30c1\u30fc\u30e0\u306b\u306f Ruby \u958b\u767a\u8005\u5411\u3051\u30c4\u30fc\u30eb\u306e\u958b\u767a\u306b\u95a2\u3059\u308b\u81a8\u5927\u306a\u30ce\u30a6\u30cf\u30a6\u304c\u84c4\u7a4d\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u305d\u306e\u7d4c\u9a13\u3068\u77e5\u8b58\u3092\u7686\u3055\u3093\u3068\u5171\u6709\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u5148\u65e5\u306e EuRuKo 2024 \u30ab\u30f3\u30d5\u30a1\u30ec\u30f3\u30b9\u3067\u306f\u3001\u5f53\u30c1\u30fc\u30e0\u306e\u30e1\u30f3\u30d0\u30fc\u3067\u3042\u308b Dmitry Pogrebnoy \u304c\u300c<em><a href=\"https:\/\/2024.euruko.org\/speakers\/dmitry_pogrebnoy\" target=\"_blank\" rel=\"noopener\" data-type=\"link\" data-id=\"https:\/\/2024.euruko.org\/speakers\/dmitry_pogrebnoy\">Demystifying Debuggers\uff08\u30c7\u30d0\u30c3\u30ac\u30fc\u3092\u89e3\u660e\u3059\u308b\uff09<\/a><\/em>\u300d\u3068\u3044\u3046\u8b1b\u6f14\u3092\u884c\u3044\u307e\u3057\u305f\u3002 \u3053\u306e\u30d6\u30ed\u30b0\u8a18\u4e8b\u306f\u3001\u305d\u306e\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u306b\u57fa\u3065\u3044\u3066 Ruby \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c7\u30d0\u30c3\u30b0\u306b\u5f79\u7acb\u3064\u30a4\u30f3\u30b5\u30a4\u30c8\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u305f\u9023\u8f09\u306e\u6700\u521d\u306e\u8a18\u4e8b\u3067\u3059\u3002<\/p>\n<p>\u3042\u3089\u3086\u308b Ruby \u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306b\u3068\u3063\u3066\u3001\u30b3\u30fc\u30c9\u304c\u671f\u5f85\u3069\u304a\u308a\u306b\u52d5\u4f5c\u3057\u306a\u3044\u72b6\u6cc1\u306f\u907f\u3051\u3089\u308c\u307e\u305b\u3093\u3002 \u305d\u306e\u3088\u3046\u306a\u72b6\u6cc1\u3067\u306f\u3001\u8ab0\u3082\u304c\u554f\u984c\u3092\u7d20\u65e9\u304f\u6b63\u78ba\u306b\u7279\u5b9a\u3057\u3066\u4fee\u6b63\u3067\u304d\u308b\u52b9\u7387\u7684\u306a\u65b9\u6cd5\u3092\u671b\u3080\u3082\u306e\u3067\u3059\u3002 \u305d\u3053\u3067\u6d3b\u7528\u3067\u304d\u308b\u306e\u304c\u3001\u30c7\u30d0\u30c3\u30b0\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f Ruby \u958b\u767a\u8005\u304c\u30d0\u30b0\u306e\u8abf\u67fb\u306b\u4f7f\u7528\u3067\u304d\u308b\u3055\u307e\u3056\u307e\u306a\u30c4\u30fc\u30eb\u3068\u624b\u6cd5\u3092\u8a73\u3057\u304f\u53d6\u308a\u4e0a\u3052\u3001 \u3044\u304f\u3064\u304b\u306e\u7a2e\u985e\u306e\u30c4\u30fc\u30eb\u306b\u3064\u3044\u3066\u3001\u305d\u306e\u5f37\u307f\u3068\u5f31\u307f\u3068\u5171\u306b\u8aac\u660e\u3057\u307e\u3059\u3002 \u5404\u30c4\u30fc\u30eb\u306e\u7279\u5fb4\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u7279\u5b9a\u306e\u30c7\u30d0\u30c3\u30b0\u30b7\u30ca\u30ea\u30aa\u306b\u6700\u3082\u52b9\u679c\u7684\u306a\u30c4\u30fc\u30eb\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>JetBrains \u793e\u5185\u306e\u3042\u308b Ruby \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u906d\u9047\u3057\u305f\u5b9f\u969b\u306e\u30d0\u30b0\u3092\u4f8b\u306b\u6319\u3052\u3066\u5177\u4f53\u7684\u306b\u8aac\u660e\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u3053\u306e\u30b1\u30fc\u30b9\u30b9\u30bf\u30c7\u30a3\u306b\u3088\u3063\u3066\u9069\u5207\u306a\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u306e\u91cd\u8981\u6027\u3092\u8aac\u660e\u3057\u3001\u30c7\u30d0\u30c3\u30b0\u30c4\u30fc\u30eb\u3092\u8003\u5bdf\u3059\u308b\u305f\u3081\u306e\u6e96\u5099\u3092\u6574\u3048\u307e\u3059\u3002<\/p>\n<p>\u7d4c\u9a13\u8c4a\u5bcc\u306a Ruby \u958b\u767a\u8005\u3067\u3042\u308c\u521d\u5fc3\u8005\u3067\u3042\u308c\u3001\u3053\u306e\u30ac\u30a4\u30c9\u3092\u6d3b\u7528\u3057\u3066\u30c7\u30d0\u30c3\u30b0\u30b9\u30ad\u30eb\u3092\u78e8\u304d\u3001\u3088\u308a\u52b9\u7387\u3088\u304f\u30d0\u30b0\u306b\u53d6\u308a\u7d44\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3067\u306f\u59cb\u3081\u307e\u3057\u3087\u3046\uff01<\/p>\n<h2 class=\"wp-block-heading\">RubyMine \u30c1\u30fc\u30e0\u304c\u4f53\u9a13\u3057\u305f\u5b9f\u969b\u306e\u30d0\u30b0<\/h2>\n<p>RubyMine \u30c1\u30fc\u30e0\u304c\u53d6\u308a\u7d44\u3093\u3067\u3044\u308b\u306e\u306f IDE \u81ea\u4f53\u306e\u958b\u767a\u3060\u3051\u306b\u3068\u3069\u307e\u308a\u307e\u305b\u3093\u3002 IDE \u306e\u6a5f\u80fd\u3092\u62e1\u5f35\u3059\u308b\u72ec\u81ea\u306e gem \u3092\u3044\u304f\u3064\u3082\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002 \u30a4\u30f3\u30b5\u30a4\u30c8\u3092\u5171\u6709\u3059\u308b\u305f\u3081\u30011 \u5e74\u307b\u3069\u524d\u306b\u3053\u306e\u3088\u3046\u306a gem \u306e 1 \u3064\u3067\u898b\u3064\u304b\u3063\u305f\u5b9f\u969b\u306e\u30d0\u30b0\u3092\u8a73\u3057\u304f\u53d6\u308a\u4e0a\u3052\u307e\u3059\u3002 \u6838\u5fc3\u7684\u306a\u554f\u984c\u306b\u6ce8\u76ee\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3001\u30b3\u30fc\u30c9\u30b5\u30f3\u30d7\u30eb\u3092\u5207\u308a\u96e2\u3057\u3066\u5358\u7d14\u5316\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306e Ruby \u30b3\u30fc\u30c9\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\">def process(thing)\n if defined? thing.to_s || defined? thing.inspect\n   puts \"Element is Printable\"\n else\n   puts \"Element is Not Printable\"\n end\nend\n\nprocess(5)               # -&gt; Element is Printable\nprocess(BasicObject.new) # -&gt; Element is Printable<\/pre>\n<p>\u3053\u306e <code>process<\/code> \u30e1\u30bd\u30c3\u30c9\u306f\u4e00\u898b\u3059\u308b\u3068\u5358\u7d14\u3067\u3059\u3002 \u7279\u5b9a\u306e\u5f15\u6570\u306b <code>to_s<\/code> \u307e\u305f\u306f <code>inspect<\/code> \u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u306e\u304c\u76ee\u7684\u3067\u3059\u3002 <code>process<\/code> \u306f\u3069\u3061\u3089\u304b\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u300cElement is Printable\u300d\u3092\u51fa\u529b\u3057\u3001\u3069\u3061\u3089\u3082\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306b\u300cElement is Not Printable\u300d\u3092\u51fa\u529b\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306e 2 \u3064\u306e\u547c\u3073\u51fa\u3057\u3068\u305d\u306e\u51fa\u529b\u304c\u4e00\u756a\u4e0b\u306b\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002 \u6700\u521d\u306e\u547c\u3073\u51fa\u3057\u3067\u3042\u308b <code>process(5)<\/code> \u306f\u300cElement is Printable\u300d\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u751f\u6210\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u6b63\u3057\u3044\u52d5\u4f5c\u3067\u3059\u3002 \u3057\u304b\u3057\u30012 \u3064\u76ee\u306e <code>process(BasicObject.new)<\/code> \u3068\u3044\u3046\u547c\u3073\u51fa\u3057\u306f\u7591\u308f\u3057\u304f\u601d\u3048\u307e\u3059\u3002 \u3053\u306e\u547c\u3073\u51fa\u3057\u306f <code>BasicObject<\/code> \u3092\u5f15\u6570\u306b\u53d6\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u300cElement is Printable\u300d\u3092\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002 <code>BasicObject<\/code> \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u63a2\u3057\u3066\u3044\u308b\u3069\u3061\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u3053\u306e\u52d5\u4f5c\u306f\u8aa4\u3063\u3066\u3044\u307e\u3059\u3002 \u3064\u307e\u308a\u3001\u3053\u306e\u30b3\u30fc\u30c9\u306b\u306f\u660e\u3089\u304b\u306b\u30d0\u30b0\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001<code>process<\/code> \u30e1\u30bd\u30c3\u30c9\u3092\u8a73\u3057\u304f\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002 \u30d0\u30b0\u3092\u898b\u3064\u3051\u3089\u308c\u307e\u3059\u304b\uff1f<\/p>\n<details class=\"wp-block-details\">\n<summary>\u7b54\u3048 &#8211; \u30af\u30ea\u30c3\u30af\u3057\u3066\u5c55\u958b\u3057\u3066\u304f\u3060\u3055\u3044\uff01<\/summary>\n<p>\u30d0\u30b0\u306f\u3053\u306e <code>if<\/code> \u6761\u4ef6\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><code>defined? thing.to_s || defined? thing.inspect<\/code><\/p>\n<p>Ruby \u306e\u6f14\u7b97\u5b50\u306b\u306f\u512a\u5148\u9806\u4f4d\u304c\u3042\u308b\u305f\u3081\u3001\u3053\u308c\u306f\u5b9f\u969b\u306b\u306f\u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30fc\u306b\u3088\u3063\u3066\u6b21\u306e\u3088\u3046\u306b\u8a55\u4fa1\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\">defined?(thing.to_s || defined?(thing.inspect))<\/pre>\n<p>\u3053\u306e\u5f0f\u306f <code>thing<\/code> \u304c <code>to_s<\/code> \u307e\u305f\u306f <code>inspect<\/code> \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u554f\u308f\u305a\u3001\u5fc5\u305a \u201cexpression\u201d \u3092\u8fd4\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u3053\u306e\u6761\u4ef6\u306f\u5e38\u306b true \u3068\u306a\u308a\u3001\u30e1\u30bd\u30c3\u30c9\u306f\u3069\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3082 ptintable \u3068\u3057\u3066\u8aa4\u3063\u3066\u5206\u985e\u3057\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u3002<\/p>\n<p>\u7c21\u5358\u306b\u4fee\u6b63\u3067\u304d\u308b\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u4e9b\u7d30\u306a\u69cb\u6587\u30a8\u30e9\u30fc\u306b\u3088\u3063\u3066\u91cd\u5927\u306a\u30ed\u30b8\u30c3\u30af\u306e\u6b20\u9665\u304c\u751f\u3058\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u6b21\u306e\u3088\u3046\u306b\u4e38\u62ec\u5f27\u3092\u4f7f\u7528\u3057\u3066\u6761\u4ef6\u3092\u660e\u793a\u7684\u306b\u69cb\u9020\u5316\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\">def process(thing)\n if defined?(thing.to_s) || defined?(thing.inspect)\n   puts \"Element is Printable\"\n else\n   puts \"Element is Not Printable\"\n end\nend\n\nprocess(5)               # -&gt; Element is Printable\nprocess(BasicObject.new) # -&gt; Element is Not Printable<\/pre>\n<p>\u3053\u306e\u4fee\u6b63\u306b\u3088\u308a\u3001\u30e1\u30bd\u30c3\u30c9\u304c <code>to_s<\/code> \u307e\u305f\u306f <code>inspect<\/code> \u3092\u5b9f\u88c5\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u5b9f\u88c5\u3057\u306a\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6b63\u78ba\u306b\u533a\u5225\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<\/details>\n<p>\u3053\u306e\u3088\u3046\u306a\u5b9f\u4f8b\u3092\u7d39\u4ecb\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30d0\u30c3\u30b0\u304c\u7d4c\u9a13\u30ec\u30d9\u30eb\u3092\u554f\u308f\u305a\u3042\u3089\u3086\u308b\u958b\u767a\u8005\u306b\u4e0d\u53ef\u6b20\u306a\u30b9\u30ad\u30eb\u3067\u3042\u308b\u3053\u3068\u793a\u3057\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u306f\u30a8\u30e9\u30fc\u3092\u4fee\u6b63\u3059\u308b\u3060\u3051\u306e\u30b9\u30ad\u30eb\u3067\u306f\u306a\u304f\u3001\u8a00\u8a9e\u306e\u8907\u96d1\u3055\u3092\u7406\u89e3\u3057\u3066\u3088\u308a\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u30b9\u30ad\u30eb\u3067\u3059\u3002<\/p>\n<p>\u3088\u308a\u8907\u96d1\u306a\u672c\u756a\u74b0\u5883\u30ec\u30d9\u30eb\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u3053\u306e\u3088\u3046\u306a\u554f\u984c\u3092\u7279\u5b9a\u3057\u3066\u89e3\u6c7a\u3059\u308b\u306e\u306f\u306f\u308b\u304b\u306b\u56f0\u96e3\u306b\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u3053\u3068\u306f\u3001\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u53d6\u308a\u4e0a\u3052\u308b\u5805\u7262\u306a\u30c7\u30d0\u30c3\u30b0\u30c4\u30fc\u30eb\u3068\u624b\u6cd5\u306e\u91cd\u8981\u6027\u3092\u660e\u78ba\u306b\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u6700\u9069\u306a\u30c4\u30fc\u30eb\u3092\u9078\u3076<\/h2>\n<p>Ruby \u30b3\u30fc\u30c9\u306e\u30c7\u30d0\u30c3\u30b0\u306b\u95a2\u3057\u3066\u306f\u3001\u958b\u767a\u8005\u304c\u3059\u3050\u306b\u4f7f\u7528\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3068\u624b\u6cd5\u304c\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002 \u307e\u305a\u306f\u57fa\u672c\u7684\u306a\u9078\u629e\u80a2\u3092\u78ba\u8a8d\u3057\u305f\u5f8c\u3001\u3088\u308a\u9ad8\u5ea6\u306a\u624b\u6cd5\u3092\u8a73\u3057\u304f\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3 class=\"wp-block-heading\">puts \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u4f7f\u3044\u65b9\u3068\u305d\u306e\u9650\u754c<\/h3>\n<p>\u6700\u3082\u57fa\u672c\u7684\u3067\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3084\u8ffd\u52a0\u306e gem \u3092\u5fc5\u8981\u3068\u3057\u306a\u3044\u306e\u306f\u3001<code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u3067\u3059\u3002 \u3053\u306e\u624b\u6cd5\u3067\u306f\u5909\u6570\u5024\u3084\u5b9f\u884c\u30d5\u30ed\u30fc\u306e\u60c5\u5831\u3092\u51fa\u529b\u3059\u308b\u305f\u3081\u3001\u30b3\u30fc\u30c9\u5185\u306b\u76f4\u63a5 print \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u633f\u5165\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u5358\u7d14\u306a\u624b\u6cd5\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u7d20\u65e9\u304f\u8abf\u67fb\u3059\u308b\u306b\u306f\u9a5a\u304f\u307b\u3069\u52b9\u679c\u7684\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u624b\u6cd5\u3092\u524d\u306e\u4f8b\u306b\u9069\u7528\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\">def process(thing)\n puts \"defined? thing.to_s: #{defined? thing.to_s}\"\n puts \"defined? thing.inspect: #{defined? thing.inspect}\"\n puts \"defined? thing.to_s || defined? thing.inspect: #{\n   defined? thing.to_s || defined? thing.inspect\n }\"\n if defined? thing.to_s || defined? thing.inspect\n   puts \"Element is Printable\"\n else\n   puts \"Element is Not Printable\"\n end\nend\n\nprocess(5)\nprocess(BasicObject.new)<\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\">defined? thing.to_s: method\ndefined? thing.inspect: method\ndefined? thing.to_s || defined? thing.inspect: expression\nElement is Printable\ndefined? thing.to_s: \ndefined? thing.inspect: \ndefined? thing.to_s || defined? thing.inspect: expression\nElement is Printable<\/pre>\n<p>\u5f15\u6570\u304c\u7570\u306a\u308b 2 \u3064\u306e\u30e1\u30bd\u30c3\u30c9\u304b\u3089\u306e\u51fa\u529b\u306b\u77db\u76fe\u304c\u3042\u308a\u3001\u554f\u984c\u304c\u3042\u308a\u305d\u3046\u306a\u7b87\u6240\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 <code>BasicObject.new<\/code> \u306e\u5834\u5408\u3001<code>thing.to_s<\/code> \u3068 <code>thing.inspect<\/code> \u306e\u3069\u3061\u3089\u3082\u672a\u5b9a\u7fa9\u3067\u3042\u308b\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001\u6761\u4ef6\u304c <code>true<\/code> \u306b\u8a55\u4fa1\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306a <code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u4fbf\u5229\u3067\u3059\u304c\u3001\u3044\u304f\u3064\u304b\u306e gem \u3092\u4f7f\u3063\u3066\u3088\u308a\u591a\u304f\u306e\u60c5\u5831\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>1. <code><a href=\"https:\/\/github.com\/AndyObtiva\/puts_debuggerer\" target=\"_blank\" rel=\"noopener\" data-type=\"link\" data-id=\"https:\/\/github.com\/AndyObtiva\/puts_debuggerer\">puts_debuggerer<\/a><\/code> gem \u306f\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u3001\u884c\u756a\u53f7\u3001\u304a\u3088\u3073\u305d\u306e\u884c\u306e\u5185\u5bb9\u3092 <code>puts<\/code> \u306e\u51fa\u529b\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b:<\/p>\n<pre class=\"EnlighterJSRAW\">require 'puts_debuggerer'\npd \"defined? thing.to_s: #{defined? thing.to_s}\"<\/pre>\n<p>\u51fa\u529b:<\/p>\n<pre class=\"EnlighterJSRAW\">[PD] example_puts_debuggerer.rb:5 in Object.process\n   &gt; pd \"defined? thing.to_s: #{defined? thing.to_s}\"\n  =&gt; \"Debug print 1: method\"<\/pre>\n<p>2. <code><a href=\"https:\/\/github.com\/awesome-print\/awesome_print\" target=\"_blank\" rel=\"noopener\" data-type=\"link\" data-id=\"https:\/\/github.com\/awesome-print\/awesome_print\">awesome_print<\/a><\/code> \u3068\u305d\u308c\u306b\u985e\u4f3c\u3059\u308b gem \u306f\u3001\u3088\u308a\u69cb\u9020\u5316\u3055\u308c\u305f\u8aad\u307f\u53d6\u308a\u3084\u3059\u3044\u51fa\u529b\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u8907\u96d1\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306f\u7279\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p><code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u6982\u3057\u3066\u4fbf\u5229\u3067\u3042\u308a\u3001\u5358\u7d14\u306a\u30b1\u30fc\u30b9\u3084\u4f55\u3089\u304b\u306e\u7406\u7531\u3067\u4ed6\u306e\u30c4\u30fc\u30eb\u3067\u306f\u5bfe\u5fdc\u3067\u304d\u306a\u3044\u5834\u5408\u306b\u306f\u52b9\u679c\u7684\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001 <code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u975e\u5e38\u306b\u57fa\u672c\u7684\u3067\u3059\u3002 \u65e2\u5b58\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8abf\u6574\u3057\u305f\u308a\u3001\u65b0\u3057\u3044\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3059\u308b\u305f\u3073\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 \u51fa\u529b\u5185\u5bb9\u3092\u5909\u66f4\u3059\u308b\u305f\u3073\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u518d\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u3082\u3042\u308b\u305f\u3081\u3001\u901a\u5e38\u306f\u5229\u4fbf\u6027\u306b\u6b20\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4 class=\"wp-block-heading\"><code>puts<\/code> \u3092\u4f7f\u7528\u3057\u305f\u30c7\u30d0\u30c3\u30b0\u306e\u9577\u6240\u3068\u77ed\u6240<\/h4>\n<p>\u9577\u6240:<\/p>\n<ul>\n<li>\u5358\u7d14\u3067\u3059\u3050\u306b\u5b9f\u88c5\u3067\u304d\u308b\u3002<\/li>\n<li>\u3042\u3089\u3086\u308b Ruby \u74b0\u5883\u3067\u6a5f\u80fd\u3059\u308b\u3002<\/li>\n<li>\u8ffd\u52a0\u306e\u30c4\u30fc\u30eb\u3084\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u4e0d\u8981\u3067\u3042\u308b\u3002<\/li>\n<\/ul>\n<p>\u77ed\u6240:<\/p>\n<ul>\n<li>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5909\u66f4\u304c\u5fc5\u8981\u3067\u3042\u308b\u3002<\/li>\n<li>\u4f7f\u3044\u3059\u304e\u308b\u3068\u30b3\u30fc\u30c9\u304c\u4e71\u96d1\u306b\u306a\u308b\u3002<\/li>\n<li>\u51fa\u529b\u5185\u5bb9\u3092\u5909\u66f4\u3059\u308b\u969b\u306b\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002<\/li>\n<li>\u3088\u308a\u9ad8\u5ea6\u306a\u30c4\u30fc\u30eb\u306b\u6bd4\u3079\u3066\u60c5\u5831\u91cf\u304c\u9650\u5b9a\u7684\u3067\u3042\u308b\u3002<\/li>\n<\/ul>\n<p><code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u7d20\u65e9\u304f\u78ba\u8a8d\u3059\u308b\u5834\u5408\u306b\u306f\u975e\u5e38\u306b\u6709\u76ca\u3067\u3059\u304c\u3001\u8907\u96d1\u306a\u30b7\u30ca\u30ea\u30aa\u306e\u5834\u5408\u3084\u983b\u7e6b\u306a\u5909\u66f4\u304c\u5fc5\u8981\u306a\u5834\u5408\u306b\u306f\u3042\u307e\u308a\u52b9\u7387\u7684\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u305d\u306e\u3088\u3046\u306a\u5834\u5408\u306b\u306f\u3001\u5bfe\u8a71\u578b\u30b3\u30f3\u30bd\u30fc\u30eb\u3084\u30d5\u30eb\u6a5f\u80fd\u306e\u30c7\u30d0\u30c3\u30ac\u30fc\u306a\u3069\u306e\u3088\u308a\u9ad8\u5ea6\u306a\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3055\u3089\u306b\u512a\u308c\u305f\u67d4\u8edf\u6027\u3068\u6027\u80fd\u3092\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<h3 class=\"wp-block-heading\">\u5bfe\u8a71\u578b\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u4f7f\u3063\u305f\u30c7\u30d0\u30c3\u30b0<\/h3>\n<p>Ruby \u958b\u767a\u8005\u306b\u3068\u3063\u3066\u3001\u5bfe\u8a71\u578b\u30b3\u30f3\u30bd\u30fc\u30eb\u306f\u6b21\u306e\u30ec\u30d9\u30eb\u306e\u30d0\u30b0\u8abf\u67fb\u30c4\u30fc\u30eb\u3068\u8a00\u3048\u307e\u3059\u3002 \u4e3b\u306a\u9078\u629e\u80a2\u3068\u3057\u3066\u306f <a href=\"https:\/\/github.com\/ruby\/irb\" target=\"_blank\" rel=\"noopener\" data-type=\"link\" data-id=\"https:\/\/github.com\/ruby\/irb\">IRB<\/a> \u3068 <a href=\"https:\/\/github.com\/pry\/pry\" target=\"_blank\" rel=\"noopener\" data-type=\"link\" data-id=\"https:\/\/github.com\/pry\/pry\">Pry<\/a> \u306e 2 \u3064\u304c\u3042\u308a\u3001\u3069\u3061\u3089\u3082\u5f37\u529b\u306a\u30a4\u30f3\u30c8\u30ed\u30b9\u30da\u30af\u30b7\u30e7\u30f3\u6a5f\u80fd\u3092\u5099\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5bfe\u8a71\u578b\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u30c7\u30d0\u30c3\u30b0\u306b\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u4e00\u822c\u7684\u306b\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b <code>binding.irb<\/code> \u307e\u305f\u306f <code>binding.pry<\/code> \u547c\u3073\u51fa\u3057\u3092\u633f\u5165\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u306e\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3055\u308c\u308b\u3068\u5bfe\u8a71\u578b\u30b3\u30f3\u30bd\u30fc\u30eb\u304c\u8d77\u52d5\u3057\u3001\u73fe\u5728\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u305d\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u5185\u3067\u4efb\u610f\u306e\u5f0f\u3092\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u524d\u306e\u4f8b\u3067 IRB \u3092\u4f7f\u7528\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\">def process(thing)\n binding.irb\n if defined? thing.to_s || defined? thing.inspect\n   puts \"Element is Printable\"\n else\n   puts \"Element is Not Printable\"\n end\nend\n\nprocess(5) # -&gt; Element is Printable\nprocess(BasicObject.new) # -&gt; Element is Printable<\/pre>\n<p>\u30b3\u30fc\u30c9\u304c <code>binding.irb<\/code> \u306e\u884c\u306b\u5230\u9054\u3059\u308b\u3068\u3001\u5bfe\u8a71\u578b\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u59cb\u307e\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\">From: 5_example_define_irb.rb @ line 2 :\n\n    1: def process(thing)\n =&gt; 2:   binding.irb\n    3:   if defined? thing.to_s || defined? thing.inspect\n    4:     puts \"Element is Printable\"\n    5:   else\n    6:     puts \"Element is Not Printable\"\n    7:   end\n\nirb(main):001&gt; defined? thing.to_s\n=&gt; nil\nirb(main):002&gt; defined? thing.inspect\n=&gt; nil\nirb(main):003&gt; defined? thing.to_s || defined? thing.inspect\n=&gt; \"expression\"\nirb(main):004&gt; exit\nElement is Printable<\/pre>\n<p>\u3053\u306e\u5bfe\u8a71\u3092\u901a\u3057\u3066\u6761\u4ef6\u306e\u5404\u90e8\u5206\u306e\u52d5\u4f5c\u3092\u8abf\u3079\u3001\u554f\u984c\u3092\u7279\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4 class=\"wp-block-heading\">\u5bfe\u8a71\u578b\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u305f\u30c7\u30d0\u30c3\u30b0\u306e\u9577\u6240\u3068\u77ed\u6240<\/h4>\n<p>\u9577\u6240:<\/p>\n<ul>\n<li><code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3088\u308a\u3082\u8907\u96d1\u3067\u67d4\u8edf\u3067\u3042\u308b\u3002<\/li>\n<li>\u305d\u306e\u5834\u3067\u306e\u8abf\u67fb\u304c\u90e8\u5206\u7684\u306b\u53ef\u80fd\u3067\u3042\u308b\u3002<\/li>\n<li>\u3059\u3079\u3066\u306e\u30c7\u30d0\u30c3\u30b0\u51fa\u529b\u3092\u4e8b\u524d\u306b\u6c7a\u3081\u308b\u5fc5\u8981\u304c\u306a\u3044\u3002<\/li>\n<\/ul>\n<p>\u77ed\u6240:<\/p>\n<ul>\n<li>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5909\u66f4\u304c\u5fc5\u8981\u3067\u3042\u308b\u3053\u3068\u306b\u306f\u5909\u308f\u308a\u306a\u3044\u3002<\/li>\n<li>\u30a4\u30f3\u30c8\u30ed\u30b9\u30da\u30af\u30b7\u30e7\u30f3\u7b87\u6240\u3092\u4e8b\u524d\u306b\u5b9a\u7fa9\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u3001\u5b9f\u884c\u6642\u306b\u5909\u66f4\u3067\u304d\u306a\u3044\u3002<\/li>\n<li>\u30a4\u30f3\u30c8\u30ed\u30b9\u30da\u30af\u30b7\u30e7\u30f3\u7b87\u6240\u3092\u5909\u66f4\u3059\u308b\u969b\u306b\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002<\/li>\n<\/ul>\n<p>\u5bfe\u8a71\u578b\u30b3\u30f3\u30bd\u30fc\u30eb\u306e\u5834\u5408\u306f\u5358\u7d14\u306a <code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3088\u308a\u3082\u9ad8\u3044\u6027\u80fd\u3092\u5f97\u3089\u308c\u307e\u3059\u304c\u3001\u5236\u9650\u304c\u306a\u304f\u306a\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u305f\u3068\u3048\u3070\u3001\u8907\u96d1\u306a\u30c7\u30d0\u30c3\u30b0\u30b7\u30ca\u30ea\u30aa\u306e\u5834\u5408\u3084\u5b9f\u884c\u3092\u7d30\u304b\u304f\u5236\u5fa1\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3001\u30d5\u30eb\u6a5f\u80fd\u642d\u8f09\u306e\u30c7\u30d0\u30c3\u30ac\u30fc\u3067\u3042\u308c\u3070\u3055\u3089\u306b\u591a\u304f\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3 class=\"wp-block-heading\">RubyMine \u30c7\u30d0\u30c3\u30ac\u30fc\u3067\u52b9\u7387\u7684\u306b\u30d0\u30b0\u4fee\u6b63<\/h3>\n<p>\u30c7\u30d0\u30c3\u30ac\u30fc\u306f\u3001Ruby \u30b3\u30fc\u30c9\u306e\u30d0\u30b0\u8abf\u67fb\u306b\u4f7f\u7528\u3067\u304d\u308b\u30c4\u30fc\u30eb\u306e\u4e2d\u3067\u306f\u6700\u9ad8\u5cf0\u306e\u3082\u306e\u3067\u3059\u3002 \u5358\u7d14\u306a <code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068\u5bfe\u8a71\u578b\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u306f\u308b\u304b\u306b\u8d85\u3048\u308b\u6a5f\u80fd\u3092\u5099\u3048\u3066\u304a\u308a\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u3092\u5b8c\u5168\u306b\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u958b\u767a\u8005\u306f\u3053\u306e\u5f37\u529b\u306a\u6a5f\u80fd\u30bb\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u4ee5\u4e0b\u306e\u64cd\u4f5c\u3092\u884c\u3048\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u7279\u5b9a\u7b87\u6240\u3067\u5b9f\u884c\u3092\u505c\u6b62\u3059\u308b\u3002<\/li>\n<li>\u5909\u6570\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u691c\u67fb\u3057\u3066\u5909\u66f4\u3059\u308b\u3002<\/li>\n<li>\u5404\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3067\u30b3\u30fc\u30eb\u30b9\u30bf\u30c3\u30af\u3092\u8abf\u3079\u308b\u3002<\/li>\n<li>\u30b3\u30fc\u30c9\u884c\u5358\u4f4d\u3067\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c\u3059\u308b\u3002<\/li>\n<li>\u73fe\u5728\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u5f0f\u3092\u8a55\u4fa1\u3059\u308b\u3002<\/li>\n<\/ul>\n<p>Ruby \u7528\u306e\u4e3b\u306a 3 \u3064\u306e\u30c7\u30d0\u30c3\u30ac\u30fc\u3092\u8a73\u3057\u304f\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>1. <a href=\"https:\/\/github.com\/deivid-rodriguez\/byebug\" target=\"_blank\" rel=\"noopener\"><code>byebug<\/code> gem<\/a><\/p>\n<ul>\n<li>Ruby 2.5.X\u3001Ruby 2.6.X\u3001Rails 5\u3001\u304a\u3088\u3073 Rails 6 \u7528\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c7\u30d0\u30c3\u30ac\u30fc\u3002<\/li>\n<li>\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3001\u30b9\u30c6\u30c3\u30d7\u5b9f\u884c\u3001\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3001\u30b9\u30bf\u30c3\u30af\u30a4\u30f3\u30c8\u30ed\u30b9\u30da\u30af\u30b7\u30e7\u30f3\u306a\u3069\u3001\u30c7\u30d0\u30c3\u30ac\u30fc\u306b\u6c42\u3081\u3089\u308c\u308b\u57fa\u672c\u6a5f\u80fd\u304c\u3059\u3079\u3066\u5099\u308f\u3063\u3066\u3044\u308b\u3002<\/li>\n<li>Rails \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5834\u5408\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002 \u901a\u5e38\u306f\u30b3\u30fc\u30c9\u5185\u306e\u6c7a\u307e\u3063\u305f\u7b87\u6240\u306b\u30c7\u30d0\u30c3\u30ac\u30fc\u3092\u8d77\u52d5\u3059\u308b\u7279\u6b8a\u306a\u547c\u3073\u51fa\u3057\u3092\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<\/li>\n<li>\u8907\u96d1\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u5229\u4fbf\u6027\u304c\u4f4e\u4e0b\u3059\u308b\u307b\u3069\u306e\u9855\u8457\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u3042\u308b\u3002<\/li>\n<\/ul>\n<p>2. <a href=\"https:\/\/github.com\/ruby\/debug\" target=\"_blank\" rel=\"noopener\"><code>debug<\/code> gem<\/a><\/p>\n<ul>\n<li>Ruby \u30d0\u30fc\u30b8\u30e7\u30f3 2.7 \u4ee5\u964d\u306e\u307f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3002<\/li>\n<li>\u30b5\u30dd\u30fc\u30c8\u5bfe\u8c61\u306e Ruby \u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u306a\u3044\u3002<\/li>\n<li>Rails \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u5834\u5408\u3001<code>byebug<\/code> \u3068\u540c\u69d8\u306b <code>debug<\/code> \u3067\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/li>\n<li>Ruby \u30d0\u30fc\u30b8\u30e7\u30f3 3.1 \u4ee5\u964d\u306b\u30d0\u30f3\u30c9\u30eb\u3055\u308c\u3066\u3044\u308b\u3002<\/li>\n<\/ul>\n<p>3. <a href=\"https:\/\/www.jetbrains.com\/help\/ruby\/debugging-code.html\" target=\"_blank\" rel=\"noopener\">RubyMine \u30c7\u30d0\u30c3\u30ac\u30fc<\/a><\/p>\n<ul>\n<li>Ruby \u30d0\u30fc\u30b8\u30e7\u30f3 2.3 \u4ee5\u964d\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u4f7f\u7528\u3059\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b\u307b\u307c\u3059\u3079\u3066\u306e Ruby \u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3002<\/li>\n<li>\u30b5\u30dd\u30fc\u30c8\u5bfe\u8c61\u306e\u3059\u3079\u3066\u306e Ruby \u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u304c\u306a\u3044\u3002<\/li>\n<li>\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u305b\u305a\u306b\u30c7\u30d0\u30c3\u30ac\u30fc\u3092\u4f7f\u7528\u3067\u304d\u308b\u3002<\/li>\n<li>\u30c7\u30d0\u30c3\u30b0\u3092\u5408\u7406\u5316\u3059\u308b\u4f7f\u3044\u3084\u3059\u3044 UI \u304c\u521d\u671f\u72b6\u614b\u3067\u5099\u308f\u3063\u3066\u3044\u308b\u3002<\/li>\n<\/ul>\n<p>\u30c7\u30d0\u30c3\u30ac\u30fc\u306b\u306f\u5e83\u7bc4\u306a\u6a5f\u80fd\u30bb\u30c3\u30c8\u304c\u5099\u308f\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u4e00\u90e8\u306e\u7279\u5b9a\u306e\u69cb\u6210\u3067\u306f\u4f7f\u3044\u306b\u304f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u30c7\u30d0\u30c3\u30ac\u30fc\u306f\u5f37\u529b\u3067\u3059\u304c\u3001\u4ed6\u306e\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u3068\u4f75\u7528\u3059\u308b\u3068\u6700\u5927\u9650\u306e\u52b9\u679c\u3092\u5f97\u3089\u308c\u307e\u3059\u3002 \u591a\u304f\u306e\u5834\u5408\u3001\u30c7\u30d0\u30c3\u30ac\u30fc\u306e\u9078\u629e\u306f\u7279\u5b9a\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3068\u69cb\u6210\u8981\u4ef6\u3001Ruby \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3001\u304a\u3088\u3073\u500b\u4eba\u306e\u597d\u307f\u306b\u3088\u3063\u3066\u6c7a\u307e\u308a\u307e\u3059\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n<p>Ruby \u3067\u306e\u30c7\u30d0\u30c3\u30b0\u306f\u30b9\u30ad\u30eb\u3068\u79d1\u5b66\u3067\u3042\u308a\u3001\u9069\u5207\u306a\u30c4\u30fc\u30eb\u3067\u514b\u670d\u3067\u304d\u308b\u8ab2\u984c\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u53d6\u308a\u4e0a\u3052\u305f\u3088\u3046\u306b\u3001\u5358\u7d14\u306a <code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u304b\u3089\u9ad8\u6027\u80fd\u306a\u30c7\u30d0\u30c3\u30ac\u30fc\u307e\u3067\u3001Ruby \u958b\u767a\u8005\u306b\u306f\u4f7f\u7528\u53ef\u80fd\u306a\u30c4\u30fc\u30eb\u30ad\u30c3\u30c8\u304c\u8c4a\u5bcc\u306b\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u8aac\u660e\u3057\u305f\u30c7\u30d0\u30c3\u30b0\u624b\u6cd5\u306b\u306f\u305d\u308c\u305e\u308c\u306b\u9577\u6240\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>puts<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u660e\u78ba\u306a\u30a4\u30f3\u30b5\u30a4\u30c8\u3092\u7d20\u65e9\u304f\u63d0\u4f9b\u3059\u308b\u305f\u3081\u3001\u5358\u7d14\u306a\u554f\u984c\u3084\u4ed6\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u306b\u6700\u9069\u3067\u3059\u3002<\/li>\n<li>IRB \u3084 Pry \u306a\u3069\u306e\u5bfe\u8a71\u578b\u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u306f\u3088\u308a\u52d5\u7684\u306a\u74b0\u5883\u3092\u5f97\u3089\u308c\u308b\u305f\u3081\u3001\u6df1\u3044\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u30a4\u30f3\u30c8\u30ed\u30b9\u30da\u30af\u30b7\u30e7\u30f3\u3084\u8907\u96d1\u306a\u5f0f\u306e\u8a55\u4fa1\u304c\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<li><code>byebug<\/code> gem \u3084 <code>debug<\/code> gem\u3001RubyMine \u30c7\u30d0\u30c3\u30ac\u30fc\u306a\u3069\u306e\u30d5\u30eb\u6a5f\u80fd\u642d\u8f09\u306e\u30c7\u30d0\u30c3\u30ac\u30fc\u3067\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u3092\u5305\u62ec\u7684\u306b\u5236\u5fa1\u3067\u304d\u308b\u305f\u3081\u3001\u958b\u767a\u8005\u306f\u3069\u3093\u306a\u306b\u8907\u96d1\u306a\u30d0\u30b0\u3067\u3082\u89e3\u6790\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u4e88\u671f\u3057\u306a\u3044\u30d0\u30b0\u3092\u767a\u898b\u3057\u3066\u6b63\u78ba\u306a\u539f\u56e0\u3092\u7279\u5b9a\u3059\u308b\u307e\u3067\u306f\u3001\u3053\u306e\u3088\u3046\u306a\u30c4\u30fc\u30eb\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3057\u3066\u4f53\u7cfb\u7684\u306a\u8abf\u67fb\u3092\u884c\u3046\u306e\u304c\u4e00\u822c\u7684\u3067\u3001\u6642\u306b\u306f\u5275\u9020\u529b\u3092\u99c6\u4f7f\u3057\u3066\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u5404\u30c7\u30d0\u30c3\u30b0\u30c4\u30fc\u30eb\u306e\u9577\u6240\u3068\u5236\u9650\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u56fa\u6709\u306e\u72b6\u6cc1\u306b\u6700\u9069\u306a\u624b\u6cd5\u3092\u9078\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>RubyMine \u30c1\u30fc\u30e0\u306f\u3001\u5f0a\u793e\u306e\u30c7\u30d0\u30c3\u30b0\u30c4\u30fc\u30eb\u304c Ruby \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3067\u3069\u306e\u3088\u3046\u306b\u6d3b\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u306b\u7279\u306b\u95a2\u5fc3\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u305c\u3072 RubyMine \u30c7\u30d0\u30c3\u30ac\u30fc\u3092\u8a73\u3057\u304f\u304a\u8a66\u3057\u306b\u306a\u308a\u3001\u4e0b\u306e\u30b3\u30e1\u30f3\u30c8\u6b04\u3067\u4f53\u9a13\u3092\u5171\u6709\u3057\u3066\u3044\u305f\u3060\u304f\u304b\u3001<a href=\"https:\/\/youtrack.jetbrains.com\/issues\/ruby\" target=\"_blank\" rel=\"noopener\">\u8ab2\u984c\u30c8\u30e9\u30c3\u30ab\u30fc<\/a>\u306b\u8ab2\u984c\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3042\u306a\u305f\u306e\u30a4\u30f3\u30b5\u30a4\u30c8\u306f\u4ed6\u306e\u958b\u767a\u8005\u306e\u5f79\u306b\u7acb\u3064\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u6b21\u56de\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30c7\u30d0\u30c3\u30ac\u30fc\u306e\u5185\u90e8\u306e\u51e6\u7406\u306b\u3064\u3044\u3066\u3055\u3089\u306b\u8a73\u3057\u304f\u8aac\u660e\u3057\u307e\u3059\u3002 \u5185\u90e8\u306e\u4ed5\u7d44\u307f\u3092\u8a73\u3057\u304f\u898b\u306a\u304c\u3089\u3001\u57fa\u672c\u7684\u306a\u30c7\u30d0\u30c3\u30ac\u30fc\u3092\u30bc\u30ed\u304b\u3089\u4f5c\u6210\u3059\u308b\u3068\u3044\u3046\u523a\u6fc0\u7684\u306a\u30c1\u30e3\u30ec\u30f3\u30b8\u306b\u3082\u53d6\u308a\u7d44\u307f\u307e\u3059\u3002 \u305d\u306e\u8aac\u660e\u3092\u901a\u3058\u3066\u30c7\u30d0\u30c3\u30b0\u30c4\u30fc\u30eb\u306e\u7406\u89e3\u3092\u5f37\u5316\u3057\u3001Ruby \u306e\u5185\u90e8\u51e6\u7406\u306b\u95a2\u3059\u308b\u3088\u308a\u6df1\u3044\u30a4\u30f3\u30b5\u30a4\u30c8\u3092\u5f97\u3089\u308c\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u305d\u308c\u307e\u3067\u306f\u3001RubyMine \u306e\u9ad8\u5ea6\u306a\u30c7\u30d0\u30c3\u30ac\u30fc\u3092\u6d3b\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u6700\u65b0\u306e RubyMine \u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u5f0a\u793e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u304b\u7121\u6599\u306e <a href=\"https:\/\/www.jetbrains.com\/toolbox\/app\/\" target=\"_blank\" rel=\"noopener\">Toolbox App<\/a> \u304b\u3089<a href=\"https:\/\/www.jetbrains.com\/ruby\/download\/\" target=\"_blank\" rel=\"noopener\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a>\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5358\u306b\u30a8\u30e9\u30fc\u3092\u898b\u3064\u3051\u3066\u4fee\u6b63\u3059\u308b\u3060\u3051\u3067\u306f\u52b9\u679c\u7684\u306a\u30c7\u30d0\u30c3\u30b0\u306f\u884c\u3048\u307e\u305b\u3093\u3002\u57fa\u790e\u30ec\u30d9\u30eb\u306e\u30b3\u30fc\u30c9\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002 \u5404\u30c7\u30d0\u30c3\u30b0\u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u3001\u5b66\u7fd2\u3001\u6539\u5584\u3001\u304a\u3088\u3073\u3088\u308a\u5805\u7262\u306a Ruby \u30b3\u30fc\u30c9\u3092\u66f8\u304f\u305f\u3081\u306e\u6a5f\u4f1a\u3067\u3059\u3002<\/p>\n<p>\u597d\u5947\u5fc3\u3092\u4fdd\u3061\u3001\u63a2\u7a76\u3057\u7d9a\u3051\u3001\u30c7\u30d0\u30c3\u30b0\u3092\u697d\u3057\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>RubyMine \u30c1\u30fc\u30e0\u4e00\u540c\u3088\u308a<\/p>\n\n\n<p><strong>\u30aa\u30ea\u30b8\u30ca\u30eb\uff08\u82f1\u8a9e\uff09\u30d6\u30ed\u30b0\u6295\u7a3f\u8a18\u4e8b\u306e\u4f5c\u8005\uff1a<\/strong><\/p>\n\n\n    <div class=\"about-author \">\n        <div class=\"about-author__box\">\n            <div class=\"row\">\n                <div class=\"about-author__box-img\">\n                    <img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/12\/991CC4DB-E9B3-4802-8667-FE2A894A543F_1_201_a.jpeg\" width=\"200\" height=\"200\" alt=\"Dmitry Pogrebnoy\" loading=\"lazy\"  class=\"avatar avatar-200 wp-user-avatar wp-user-avatar-200 photo avatar-default\">\n                <\/div>\n                <div class=\"about-author__box-text\">\n                                            <h4>Dmitry Pogrebnoy<\/h4>\n                                                        <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n","protected":false},"author":1394,"featured_media":536252,"comment_status":"closed","ping_status":"closed","template":"","categories":[4156],"tags":[8636],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/ruby\/533542"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/ruby"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/types\/ruby"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/users\/1394"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/comments?post=533542"}],"version-history":[{"count":9,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/ruby\/533542\/revisions"}],"predecessor-version":[{"id":536282,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/ruby\/533542\/revisions\/536282"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/media\/536252"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/media?parent=533542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/categories?post=533542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/tags?post=533542"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/cross-post-tag?post=533542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}