{"id":49,"date":"2023-01-09T01:49:21","date_gmt":"2022-08-25T18:26:29","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/"},"modified":"2025-07-31T13:39:48","modified_gmt":"2025-07-31T04:39:48","slug":"ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/","title":{"rendered":"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<h3>\u30a4\u30f3\u30c8\u30ed\u30c0\u30af\u30b7\u30e7\u30f3<\/h3>\n<p>\u6587\u5b57\u5217\u306f\u3001\u6587\u5b57\u3001\u6570\u5b57\u3001\u307e\u305f\u306f\u8a18\u53f7\u304b\u3089\u306a\u308b\u4e00\u3064\u4ee5\u4e0a\u306e\u9023\u7d9a\u3057\u305f\u6587\u5b57\u306e\u5217\u3067\u3059\u3002<\/p>\n<p>Ruby\u306e\u6587\u5b57\u5217\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\u3001\u4ed6\u306e\u8a00\u8a9e\u3068\u306f\u7570\u306a\u308a\u3001\u6587\u5b57\u5217\u306f\u53ef\u5909\u3067\u3042\u308a\u3001\u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u4ee3\u308f\u308a\u306b\u305d\u306e\u5834\u3067\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307b\u307c\u3059\u3079\u3066\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u6587\u5b57\u5217\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u6587\u5b57\u5217\u306f\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3057\u30e6\u30fc\u30b6\u30fc\u3068\u306e\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002\u5b9f\u969b\u3001\u4eca\u8aad\u3093\u3067\u3044\u308b\u3053\u306e\u30da\u30fc\u30b8\u3082\u3001\u3042\u306a\u305f\u306e\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3092\u901a\u3058\u3066\u753b\u9762\u4e0a\u306b\u8868\u793a\u3055\u308c\u305f\u6587\u5b57\u5217\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u6587\u5b57\u5217\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4e2d\u3067\u3082\u6700\u3082\u91cd\u8981\u306a\u57fa\u790e\u306e\u4e00\u3064\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3059\u3002\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3057\u3001\u753b\u9762\u306b\u8868\u793a\u3057\u3001\u5909\u6570\u306b\u683c\u7d0d\u3057\u3001\u8907\u6570\u306e\u6587\u5b57\u5217\u3092\u7d50\u5408\u3059\u308b\u65b9\u6cd5\u3001\u6539\u884c\u3001\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u3001\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u306a\u3069\u306e\u7279\u6b8a\u6587\u5b57\u3092\u6271\u3046\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3059\u3002<\/p>\n<h2>\u6587\u5b57\u5217\u306e\u4f5c\u6210\u3068\u5370\u5237<\/h2>\n<p>Ruby\u3067\u306f\u3001\u6587\u5b57\u5217\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff08&#8217;\uff09\u307e\u305f\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\uff08&#8221;\uff09\u3067\u56f2\u307e\u308c\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001\u6587\u5b57\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u3069\u3061\u3089\u304b\u306e\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">'This is a string in single quotes.'<\/span><\/span>\r\n\r\n<span class=\"token string-literal\"><span class=\"token string\">\"This is a string in double quotes.\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3084\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u3069\u3061\u3089\u3092\u4f7f\u3046\u304b\u306f\u9078\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3001\u4e00\u8cab\u6027\u304c\u3042\u308c\u3070\u3069\u3061\u3089\u3092\u9078\u3093\u3067\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u5b66\u3076\u6587\u5b57\u5217\u88dc\u9593\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u306b\u6587\u5b57\u5217\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u306f\u3001print\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>print <span class=\"token string-literal\"><span class=\"token string\">\"Let's print out this string.\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u30d7\u30ea\u30f3\u30c8\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6587\u5b57\u5217\u3092\u305d\u306e\u307e\u307e\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u8a66\u3057\u3066\u307f\u3066\u3002\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3092\u4f7f\u3063\u3066\u3001print.rb\u3068\u3044\u3046\u65b0\u3057\u3044Ruby\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u3001print\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u30663\u3064\u306e\u6587\u5b57\u5217\u3092\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>print.rb\u306e\u5185\u5bb9\u3092\u65e5\u672c\u8a9e\u3067\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<pre class=\"post-pre\"><code>print <span class=\"token string-literal\"><span class=\"token string\">'This is the first string.'<\/span><\/span>\r\nprint <span class=\"token string-literal\"><span class=\"token string\">'This is the second string.'<\/span><\/span>\r\nprint <span class=\"token string-literal\"><span class=\"token string\">'This is the third string.'<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">ruby print.rb<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>This is the first string.This is the second string.This is the third string.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\uff13\u3064\u306e\u6587\u5b57\u5217\u306f\uff11\u3064\u306e\u884c\u306b\u307e\u3068\u3081\u3066\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u304c\u3001\u672c\u6765\u306f\u305d\u308c\u305e\u308c\u306e\u6587\u5b57\u5217\u3092\u5225\u3005\u306e\u884c\u306b\u8868\u793a\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u6539\u884c\u6587\u5b57\u3092\u81ea\u5206\u3067\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u30013\u3064\u306e\u6587\u5b57\u5217\u3092\u5225\u3005\u306e\u884c\u306b\u8868\u793a\u3057\u305f\u3044\u5834\u5408\u306f\u3001puts\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u3092print\u3067\u306f\u306a\u304fputs\u3092\u4f7f\u3046\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u30d7\u30ea\u30f3\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<pre class=\"post-pre\"><code><mark>puts<\/mark> <span class=\"token string-literal\"><span class=\"token string\">'This is the first string.'<\/span><\/span>\r\n<mark>puts<\/mark> <span class=\"token string-literal\"><span class=\"token string\">'This is the second string.'<\/span><\/span>\r\n<mark>puts<\/mark> <span class=\"token string-literal\"><span class=\"token string\">'This is the third string.'<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u4eca\u5ea6\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u518d\u5ea6\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u3059\u308b\u3068\u3001\u3053\u306e\u3088\u3046\u306a\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>This is the first string. This is the second string. This is the third string.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>puts\u30e1\u30bd\u30c3\u30c9\u306f\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3092\u51fa\u529b\u3057\u3001\u3055\u3089\u306b\u6539\u884c\u6587\u5b57\u3092\u6587\u5b57\u5217\u306e\u672b\u5c3e\u306b\u81ea\u52d5\u7684\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<h2>\u5909\u6570\u306b\u6587\u5b57\u5217\u3092\u4fdd\u5b58\u3059\u308b<\/h2>\n<p>\u5909\u6570\u3068\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306e\u30e1\u30e2\u30ea\u5185\u306e\u3042\u308b\u5834\u6240\u306b\u540d\u524d\u3092\u4ed8\u3051\u305f\u3082\u306e\u3067\u3059\u3002\u30c7\u30fc\u30bf\u3092\u683c\u7d0d\u3057\u3001\u5f8c\u3067\u547c\u3073\u51fa\u3059\u305f\u3081\u306b\u5909\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u6587\u5b57\u5217\u3092\u5909\u6570\u306b\u4fdd\u5b58\u3059\u308b\u306b\u306f\u3001\u5909\u6570\u540d\u3092\u5b9a\u7fa9\u3057\u3001\u6587\u5b57\u5217\u306e\u5024\u3092\u4ee3\u5165\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>my_string <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">'This is my string'<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u305d\u308c\u304b\u3089\u3001\u5024\u3092\u53d6\u308a\u51fa\u3059\u305f\u3081\u306b\u306f\u3001\u5909\u6570\u306e\u540d\u524d\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>print my_string\r\n<\/code><\/pre>\n<p>\u81ea\u5206\u81ea\u8eab\u3067\u3053\u308c\u3092\u8a66\u3059\u305f\u3081\u306b\u3001\u30a8\u30c7\u30a3\u30bf\u3067string_variables.rb\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">nano<\/span> string_variables.rb<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002 (Sono ato, tsugi no k\u014ddo o tsuika shite kudasai.)<\/p>\n<div>\u6587\u5b57\u5217\u5909\u6570\u306e.rb\u30d5\u30a1\u30a4\u30eb<\/div>\n<pre class=\"post-pre\"><code>my_name <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"Sammy the Shark\"<\/span><\/span>\r\nmy_age <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"none of your business\"<\/span><\/span>\r\n\r\nputs my_name\r\nputs my_age\r\n<\/code><\/pre>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001my_name\u3068my_age\u3068\u3044\u30462\u3064\u306e\u5909\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u306e\u5909\u6570\u306b\u306f\u6587\u5b57\u5217\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3059\u3002\u305d\u3057\u3066\u3001puts\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u305d\u308c\u305e\u308c\u306e\u6587\u5b57\u5217\u3092\u500b\u5225\u306e\u884c\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092CTRL + X\u3068y\u3067\u4fdd\u5b58\u3057\u3066\u3001\u305d\u306e\u5f8c\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">ruby string_variables.rb<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Sammy the Shark none of your business<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u5909\u6570\u306b\u6587\u5b57\u5217\u3092\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u3067\u3001\u540c\u3058\u6587\u5b57\u5217\u3092\u7e70\u308a\u8fd4\u3057\u30bf\u30a4\u30d7\u3057\u306a\u304f\u3066\u3082\u4f7f\u3044\u305f\u3044\u6642\u306b\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u6587\u5b57\u5217\u3092\u3088\u308a\u7c21\u5358\u306b\u64cd\u4f5c\u3057\u305f\u308a\u53d6\u308a\u6271\u3063\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u3001\u6587\u5b57\u5217\u3092\u7d50\u5408\u3059\u308b\u65b9\u6cd5\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u6587\u5b57\u5217\u306e\u9023\u7d50<\/h2>\n<p>\u9023\u7d50\u306f\u3001\u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b2\u3064\u4ee5\u4e0a\u306e\u6587\u5b57\u5217\u3092\u7d50\u5408\u3059\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u9023\u7d50\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u9023\u7d50\u6f14\u7b97\u5b50\u3067\u3042\u308b + \u8a18\u53f7\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u306e + \u8a18\u53f7\u306f\u3001\u7b97\u8853\u6f14\u7b97\u3068\u4e00\u7dd2\u306b\u4f7f\u7528\u3055\u308c\u308b\u5834\u5408\u306b\u3082\u52a0\u7b97\u6f14\u7b97\u5b50\u3068\u3057\u3066\u3082\u6a5f\u80fd\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306f\u3001\u6587\u5b57\u5217&#8221;\u30b5\u30f3\u30df\u30fc&#8221;\u3068&#8221;\u30b7\u30e3\u30fc\u30af&#8221;\u3092\u9023\u7d50\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">\"sammy\"<\/span><\/span> <span class=\"token operator\">+<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"shark\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u6b21\u306e\u51fa\u529b\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>sammyshark<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u9023\u7d50\u306f\u6587\u5b57\u5217\u3092\u672b\u5c3e\u540c\u58eb\u3067\u7d50\u5408\u3057\u3001\u305d\u308c\u3089\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u5168\u304f\u65b0\u3057\u3044\u6587\u5b57\u5217\u306e\u5024\u3092\u51fa\u529b\u3057\u307e\u3059\u3002\u3082\u3057\u300csammy\u300d\u3068\u300cshark\u300d\u306e\u9593\u306b\u30b9\u30da\u30fc\u30b9\u304c\u6b32\u3057\u3044\u5834\u5408\u306f\u3001\u305d\u306e\u30b9\u30da\u30fc\u30b9\u3092\u7247\u65b9\u306e\u6587\u5b57\u5217\u306b\u542b\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\uff1a<\/p>\n<pre class=\"post-pre\"><code>\"sammy \" + \"shark\"\r\n<\/code><\/pre>\n<p>\u4eca\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u3067\u3053\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u5b9f\u969b\u306b\u66f8\u304f\u3053\u3068\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304c\u3001\u6587\u5b57\u5217\u3068\u5909\u6570\u3092\u983b\u7e41\u306b\u7d44\u307f\u5408\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u969b\u306b\u9023\u7d50\u304c\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3092\u6319\u3052\u307e\u3057\u3087\u3046: (Rei o age mashou)<\/p>\n<pre class=\"post-pre\"><code>color <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"Blue\"<\/span><\/span>\r\nprint <span class=\"token string-literal\"><span class=\"token string\">\"My favorite color is \"<\/span><\/span> <span class=\"token operator\">+<\/span> color\r\n<\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u51fa\u529b\u306f\u300c\u79c1\u306e\u597d\u304d\u306a\u8272\u306f\u9752\u3067\u3059\u300d\u3068\u306a\u308a\u307e\u3059\u3002\u6587\u5b57\u5217\u306e\u4e2d\u306e\u300cis\u300d\u306e\u5f8c\u306b\u30b9\u30da\u30fc\u30b9\u3092\u6b8b\u3057\u305f\u305f\u3081\u3001\u51fa\u529b\u306b\u306f\u6587\u5b57\u5217\u3068\u5909\u6570\u306e\u5024\u306e\u9593\u306b\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u8907\u6570\u306e\u6587\u5b57\u5217\u3092\u3053\u306e\u65b9\u6cd5\u3067\u9023\u7d50\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002concatenation.rb\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u9023\u7d50.rb<\/div>\n<pre class=\"post-pre\"><code>my_name <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"Sammy the Shark\"<\/span><\/span>\r\nmy_age <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"none of your business\"<\/span><\/span>\r\n\r\nputs <span class=\"token string-literal\"><span class=\"token string\">\"My name is \"<\/span><\/span> <span class=\"token operator\">+<\/span> my_name <span class=\"token operator\">+<\/span> <span class=\"token string-literal\"><span class=\"token string\">\" and my age is \"<\/span><\/span> <span class=\"token operator\">+<\/span> my_age <span class=\"token operator\">+<\/span> <span class=\"token string-literal\"><span class=\"token string\">\".\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001my_name\u3068my_age\u3068\u3044\u30462\u3064\u306e\u5909\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u306b\u6587\u5b57\u5217\u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u304a\u308a\u3001\u4ee5\u524d\u306b\u884c\u3063\u305f\u306e\u3068\u540c\u3058\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u4eca\u56de\u306f\u5024\u3092\u5370\u5237\u3059\u308b\u4ee3\u308f\u308a\u306b\u3001\u3088\u308a\u8a73\u3057\u3044\u6587\u8108\u3092\u6301\u3064\u6587\u5b57\u5217\u3092\u9023\u7d50\u3057\u3066\u3001\u305d\u308c\u3089\u306e\u5024\u3092\u5370\u5237\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>My name is Sammy the Shark and my age is none of your business.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u5c0f\u3055\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001\u5909\u6570\u3092\u3053\u306e\u6587\u5b57\u5217\u306b\u7d44\u307f\u8fbc\u3080\u305f\u3081\u306b\u7d50\u5408\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u8907\u6570\u306e\u6587\u5b57\u5217\u3092\u9023\u7d50\u3055\u305b\u308b\u3053\u3068\u3067\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u5168\u4f53\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u3001\u5f8c\u3067\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u4f5c\u6210\u3057\u305f\u6587\u5b57\u5217\u3092\u65b0\u3057\u3044\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div>\u7d50\u5408.rb<\/div>\n<pre class=\"post-pre\"><code>my_name <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"Sammy the Shark\"<\/span><\/span>\r\nmy_age <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"none of your business\"<\/span><\/span>\r\n\r\n<span class=\"token comment\"># assign concatenated string to variable<\/span>\r\noutput <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"My name is \"<\/span><\/span> <span class=\"token operator\">+<\/span> my_name <span class=\"token operator\">+<\/span> <span class=\"token string-literal\"><span class=\"token string\">\" and my age is \"<\/span><\/span> <span class=\"token operator\">+<\/span> my_age <span class=\"token operator\">+<\/span> <span class=\"token string-literal\"><span class=\"token string\">\".\"<\/span><\/span>\r\n\r\n<span class=\"token comment\"># Print the output.<\/span>\r\nputs output\r\n<\/code><\/pre>\n<p>\u3053\u306e\u3088\u3046\u306a\u5c0f\u3055\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001\u8ffd\u52a0\u306e\u51fa\u529b\u5909\u6570\u3092\u4f7f\u3046\u3053\u3068\u306f\u304a\u305d\u3089\u304f\u4e0d\u8981\u3067\u3057\u3087\u3046\u3002\u3057\u304b\u3057\u3001\u3088\u308a\u5927\u304d\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001\u8907\u6570\u306e\u5834\u6240\u3067\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u9023\u7d50\u3092\u4f7f\u3063\u3066\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u9023\u7d50\u3084\u7b97\u8853\u306e\u3088\u3046\u306a\u30c7\u30fc\u30bf\u51e6\u7406\u3092\u51fa\u529b\u304b\u3089\u5206\u96e2\u3059\u308b\u3053\u3068\u306f\u826f\u3044\u7fd2\u6163\u3067\u3059\u3002\u5c06\u6765\u7684\u306b\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u5927\u304d\u304f\u306a\u308a\u3001\u30ed\u30b8\u30c3\u30af\u3068\u51fa\u529b\u3092\u5225\u3005\u306e\u30d5\u30a1\u30a4\u30eb\u3084\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u5206\u3051\u3066\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u6c42\u3081\u3089\u308c\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u7570\u306a\u308b\u30c7\u30fc\u30bf\u578b\u306e\u9593\u3067\u306f\u3001\u5fc5\u305a+\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b\u3048\u3070\u3001\u6587\u5b57\u5217\u3068\u6574\u6570\u3092\u9023\u7d50\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u4f55\u304c\u8d77\u3053\u308b\u304b\u3092\u898b\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u6301\u3064\u65b0\u3057\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u300cstrings_and_integers.rb\u300d\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>strings_and_integers.rb\u3092\u65e5\u672c\u8a9e\u306b\u81ea\u7136\u306b\u66f8\u304d\u63db\u3048\u308b\u30011\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u63d0\u793a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<pre class=\"post-pre\"><code>my_name <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"Sammy the Shark\"<\/span><\/span>\r\nmy_number <span class=\"token operator\">=<\/span> <span class=\"token number\">27<\/span>\r\n\r\nprint my_name <span class=\"token operator\">+<\/span> my_number\r\n<\/code><\/pre>\n<p>\u4eca\u56de\u306f\u3001\u6587\u5b57\u5217\u300cSammy the Shark\u300d\u3092\u4fdd\u6301\u3059\u308b\u300cmy_name\u300d\u3068\u6574\u6570\u300c27\u300d\u3092\u4fdd\u6301\u3059\u308b\u300cmy_number\u300d\u3068\u3044\u3046\u5909\u6570\u304c\u3042\u308a\u307e\u3059\u3002\u5f15\u7528\u7b26\u3067\u56f2\u307e\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u300127\u304c\u6587\u5b57\u5217\u3067\u306f\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u5c0f\u6570\u70b9\u3082\u306a\u3044\u305f\u3081\u3001\u6574\u6570\u3067\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">ruby strings_and_ints.rb<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>strings_and_ints.rb:4:in `+&#8217;: no implicit conversion of Integer into String (TypeError) from strings_and_ints.rb:4:in `&lt;main&gt;&#8217;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6574\u6570\u3092\u6587\u5b57\u5217\u306b\u6697\u9ed9\u7684\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3068\u3044\u3046\u30a8\u30e9\u30fc\u306f\u3001Ruby\u3067\u306f\u65e2\u5b58\u306e\u6587\u5b57\u5217\u306b\u306e\u307f\u6587\u5b57\u5217\u3092\u9023\u7d50\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f32.3\u4ee5\u4e0b\u3067\u306f\u3001\u4ee3\u308f\u308a\u306b\u3053\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff1a<br \/>\nstrings_and_ints.rb:4:in `+&#8217;: no implicit conversion of Fixnum into String (TypeError)<br \/>\nfrom strings_and_ints.rb:4:in `<main>&#8216;<\/main><\/div>\n<p>\u30ad\u30fc\u30ef\u30fc\u30c9\u3067\u3042\u308bFixnum\u306f\u3001\u4ee5\u524d\u306eRuby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u6574\u6570\u306b\u4e0e\u3048\u3089\u308c\u305f\u30c7\u30fc\u30bf\u578b\u3067\u3057\u305f\u3002\u305d\u308c\u306fFixed Number\u306e\u7565\u79f0\u3067\u3059\u3002Ruby2.4\u3067\u306f\u3001Fixnum\u3068\u305d\u306e\u5bfe\u5fdc\u3059\u308bBignum\u306f\u5b58\u5728\u305b\u305a\u3001\u305d\u308c\u3089\u306f\u4ee3\u308f\u308a\u306bInteger\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n<\/div>\n<p>\u79c1\u305f\u3061\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5909\u66f4\u3057\u3001\u6570\u5b5727\u3092\u5f15\u7528\u7b26\uff08\u300c27\u300d\uff09\u3067\u56f2\u3080\u3053\u3068\u3067\u3001\u6574\u6570\u3067\u306f\u306a\u304f\u6587\u5b57\u5217\u3068\u3057\u3066\u5ba3\u8a00\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u306f\u3001\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u969b\u306b\u6570\u5b57\u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<div>\u30b9\u30c8\u30ea\u30f3\u30b0\u3068\u6574\u6570\u3092\u6271\u3046\u30d5\u30a1\u30a4\u30eb strings_and_integers.rb<\/div>\n<pre class=\"post-pre\"><code>my_name <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"Sammy the Shark\"<\/span><\/span>\r\nmy_number <span class=\"token operator\">=<\/span> <span class=\"token number\">27<\/span>\r\n\r\nprint my_name <span class=\"token operator\">+<\/span> my_number<mark><span class=\"token punctuation\">.<\/span>to_s<\/mark>\r\n<\/code><\/pre>\n<p>.to_s \u30e1\u30bd\u30c3\u30c9\u306f\u6574\u6570\u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u3088\u308a\u826f\u3044\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002\u306a\u305c\u306a\u3089\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u3067\u306f\u6570\u5024\u3092\u6574\u6570\u306e\u307e\u307e\u4fdd\u6301\u3057\u3066\u304a\u304d\u305f\u3044\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u8868\u793a\u3059\u308b\u969b\u306b\u306e\u307f\u6587\u5b57\u5217\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u30ed\u30b8\u30c3\u30af\u306e\u4ed6\u306e\u90e8\u5206\u3067\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306b\u306f\u6574\u6570\u306e\u307e\u307e\u3067\u3042\u308b\u3053\u3068\u304c\u671b\u307e\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u3082\u3046\u4e00\u5ea6\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308c\u3070\u3001\u753b\u9762\u4e0a\u306b\u30b5\u30e1\u306e\u30b5\u30df\u30fc27\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u90f5\u4fbf\u756a\u53f7\u3001\u901a\u8ca8\u3001\u96fb\u8a71\u756a\u53f7\u306a\u3069\u3001\u753b\u9762\u4e0a\u3067\u30c6\u30ad\u30b9\u30c8\u3068\u4e00\u7dd2\u306b\u8868\u793a\u3057\u305f\u3044\u6570\u5024\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306b\u3001\u6570\u5024\u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3057\u3066\u9023\u7d50\u3059\u308b\u3053\u3068\u306f\u983b\u7e41\u306b\u906d\u9047\u3059\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u9023\u7d50\u306f\u5f37\u529b\u3067\u3059\u304c\u3001\u96e3\u3057\u3044\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002+ \u6f14\u7b97\u5b50\u306e\u3046\u3061\u306e1\u3064\u3092\u8aa4\u3063\u3066\u7701\u7565\u3059\u308b\u3068\u3001\u69cb\u6587\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u5909\u6570\u306b\u4fdd\u6301\u3055\u308c\u305f\u6570\u5024\u3092\u542b\u3080\u6587\u5b57\u5217\u3092\u7d50\u5408\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3001\u5909\u6570\u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002Ruby\u306b\u306f\u3001\u3053\u308c\u3089\u306e\u554f\u984c\u306e\u4e21\u65b9\u306b\u5bfe\u5fdc\u3059\u308b\u6587\u5b57\u5217\u5185\u633f\u3068\u547c\u3070\u308c\u308b\u5909\u6570\u306e\u5024\u3092\u6587\u5b57\u5217\u306b\u57cb\u3081\u8fbc\u3080\u5225\u306e\u65b9\u6cd5\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u6587\u5b57\u5217\u5185\u633f\u3092\u4f7f\u7528\u3059\u308b<\/h2>\n<p>\u6587\u5b57\u5217\u3068\u5909\u6570\u3092\u9023\u7d50\u3059\u308b\u969b\u3001\u51fa\u529b\u3092\u8aad\u307f\u3065\u3089\u304f\u3057\u3066\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u6587\u5b57\u5217\u5185\u306b\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u307e\u308c\u305f\u5f0f\u3092\u57cb\u3081\u8fbc\u3080\u3053\u3068\u3067\u3001\u6587\u5b57\u5217\u88dc\u9593\u306f\u3053\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304b\u306a\u3044\u3067\u304f\u3060\u3055\u3044:<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">\"My name is \"<\/span><\/span> <span class=\"token operator\">+<\/span> my_name <span class=\"token operator\">+<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"!\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u3053\u308c\u3092\u3084\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">\"My name is <\/span><span class=\"token interpolation\"><span class=\"token delimiter punctuation\">#{<\/span><span class=\"token content\">my_name<\/span><span class=\"token delimiter punctuation\">}<\/span><\/span><span class=\"token string\">!\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u6587\u5b57\u5217\u3092\u7d42\u4e86\u3055\u305b\u3066\u300c+\u300d\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3059\u308b\u4ee3\u308f\u308a\u306b\u3001\u5909\u6570\u3092\u300c#{}\u300d\u69cb\u6587\u3067\u56f2\u307f\u307e\u3059\u3002\u3053\u306e\u69cb\u6587\u306f\u3001Ruby\u306b\u5f0f\u3092\u8a55\u4fa1\u3055\u305b\u3066\u6587\u5b57\u5217\u306b\u633f\u5165\u3059\u308b\u3053\u3068\u3092\u6307\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002interpolation.rb\u3068\u3044\u3046\u65b0\u3057\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u30a4\u30f3\u30bf\u30dd\u30ec\u30fc\u30b7\u30e7\u30f3.rb<\/div>\n<pre class=\"post-pre\"><code>my_name <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"Sammy the Shark\"<\/span><\/span>\r\nmy_age <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"none of your business\"<\/span><\/span>\r\n\r\noutput <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"My name is <\/span><span class=\"token interpolation\"><span class=\"token delimiter punctuation\">#{<\/span><span class=\"token content\">my_name<\/span><span class=\"token delimiter punctuation\">}<\/span><\/span><span class=\"token string\"> and my age is <\/span><span class=\"token interpolation\"><span class=\"token delimiter punctuation\">#{<\/span><span class=\"token content\">my_age<\/span><span class=\"token delimiter punctuation\">}<\/span><\/span><span class=\"token string\">.\"<\/span><\/span>\r\n\r\nputs output\r\n<\/code><\/pre>\n<p>\u3053\u308c\u306f\u3001\u3059\u3067\u306b\u66f8\u304b\u308c\u305f\u540c\u3058\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u6587\u5b57\u5217\u88dc\u9593\u3092\u4f7f\u7528\u3057\u3066\u51fa\u529b\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6587\u5b57\u5217\u88dc\u5b8c\u306b\u306f\u3082\u3046\u4e00\u3064\u306e\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\uff1a\u6570\u5024\u3092\u81ea\u52d5\u7684\u306b\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002strings_and_integers.rb\u3068\u3044\u3046\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u899a\u3048\u3066\u3044\u307e\u3059\u304b\uff1f\u30a8\u30c7\u30a3\u30bf\u3067\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u518d\u5ea6\u958b\u304d\u3001\u6700\u5f8c\u306e\u884c\u3092\u6b21\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\uff1a<\/p>\n<div>strings_and_integers.rb\u3092\u65e5\u672c\u8a9e\u3067\u8868\u73fe\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<pre class=\"post-pre\"><code>my_name <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"Sammy the Shark\"<\/span><\/span>\r\nmy_number <span class=\"token operator\">=<\/span> <span class=\"token number\">27<\/span>\r\n\r\n<span class=\"token comment\"># use interpolation instead of concatenation<\/span>\r\nprint <span class=\"token string-literal\"><span class=\"token string\">\"My name is <\/span><span class=\"token interpolation\"><span class=\"token delimiter punctuation\">#{<\/span><span class=\"token content\">my_name<\/span><span class=\"token delimiter punctuation\">}<\/span><\/span><span class=\"token string\"> and my favorite number is <\/span><span class=\"token interpolation\"><span class=\"token delimiter punctuation\">#{<\/span><span class=\"token content\">my_number<\/span><span class=\"token delimiter punctuation\">}<\/span><\/span><span class=\"token string\">.\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u51fa\u529b\u7d50\u679c\u304c\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u305f\u969b\u306b\u81ea\u52d5\u7684\u306bRuby\u304c\u5909\u6570my_number\u3092\u6587\u5b57\u5217\u306b\u5909\u63db\u3057\u3001\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>My name is Sammy the Shark and my favorite number is 27.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6587\u5b57\u5217\u5185\u633f\uff08string interpolation\uff09\u306f\u3001\u5f37\u529b\u3067\u4fbf\u5229\u306a\u624b\u6cd5\u3067\u3059\u3002\u5909\u6570\u3092\u542b\u3081\u305f\u6587\u5b57\u5217\u306e\u9023\u7d50\u306b\u304a\u3044\u3066\u3082\u3001\u4e00\u822c\u7684\u306b\u6700\u9069\u306a\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<h2>\u6587\u5b57\u5217\u30ea\u30c6\u30e9\u30eb\u3068\u6587\u5b57\u5217\u306e\u5024<\/h2>\n<p>\u4f5c\u6210\u3057\u305f\u3059\u3079\u3066\u306e\u6587\u5b57\u5217\u304c\u3001\u30b3\u30fc\u30c9\u5185\u3067\u306f\u5f15\u7528\u7b26\u3067\u56f2\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u304c\u3001\u5b9f\u969b\u306e\u51fa\u529b\u7d50\u679c\u306b\u306f\u5f15\u7528\u7b26\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u308c\u3089\u3092\u6307\u3059\u969b\u306b\u306f\u3001\u533a\u5225\u304c\u3042\u308a\u307e\u3059\u3002\u6587\u5b57\u5217\u30ea\u30c6\u30e9\u30eb\u306f\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u307e\u307e\u306e\u6587\u5b57\u5217\u3067\u3001\u5f15\u7528\u7b26\u3092\u542b\u307f\u307e\u3059\u3002\u6587\u5b57\u5217\u306e\u5024\u306f\u3001\u51fa\u529b\u3067\u898b\u308b\u3082\u306e\u3067\u3042\u308a\u3001\u5f15\u7528\u7b26\u306f\u542b\u307f\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u308c\u306f\u6587\u5b57\u5217\u30ea\u30c6\u30e9\u30eb\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">\"Sammy the Shark\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u6587\u5b57\u5217\u306e\u5024\u306f\u30b5\u30e1\u306e\u30b5\u30df\u30fc\u3067\u3059\u3002<\/p>\n<p>\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u3001\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u30de\u30fc\u30af\u3084\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u306a\u3069\u3001\u7279\u6b8a\u6587\u5b57\u3092\u6587\u5b57\u5217\u5185\u3067\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408\u3092\u9664\u3044\u3066\u3001\u3053\u306e\u9055\u3044\u306b\u3064\u3044\u3066\u5fc3\u914d\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h2>\u6587\u5b57\u5217\u5185\u306e\u5f15\u7528\u7b26\u3068\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u306e\u30a8\u30b9\u30b1\u30fc\u30d7<\/h2>\n<p>\u5f15\u7528\u7b26\u306f\u6587\u5b57\u5217\u3092\u793a\u3059\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u305f\u3081\u3001\u6587\u5b57\u5217\u5185\u3067\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u3084\u5f15\u7528\u7b26\u3092\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u5c11\u3057\u4f59\u5206\u306a\u4f5c\u696d\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u300c\u3082\u3057\u3001\u30b7\u30f3\u30b0\u30eb\u30af\u30aa\u30fc\u30c8\u3067\u56f2\u307e\u308c\u305f\u6587\u5b57\u5217\u306e\u4e2d\u3067\u3001\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u3092\u4f7f\u304a\u3046\u3068\u3059\u308b\u3068\u3001\u3053\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u300d<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">'This isn'<\/span><\/span>t what <span class=\"token constant\">I<\/span> wanted<span class=\"token punctuation\">.<\/span>'\r\n<\/code><\/pre>\n<p>\u300cisn&#8217;t\u300d \u3067\u7d42\u308f\u308b\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u306f\u3001\u3053\u306e\u4f8b\u306e\u5947\u5999\u306a\u5f37\u8abf\u8868\u793a\u304b\u3089\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u6587\u5b57\u5217\u3092\u7d42\u4e86\u3055\u305b\u307e\u3059\u3002\u305d\u306e\u7d50\u679c\u3001Ruby\u306e\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u306f\u610f\u56f3\u3055\u308c\u305f\u6587\u5b57\u5217\u306e\u6b8b\u308a\u3092\u30b3\u30fc\u30c9\u3068\u3057\u3066\u89e3\u6790\u3057\u3088\u3046\u3068\u3057\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u307e\u308c\u305f\u6587\u5b57\u5217\u5185\u306b\u3055\u3089\u306b\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u3001\u540c\u3058\u72b6\u6cc1\u306b\u3076\u3061\u5f53\u305f\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">\"Sammy says, \"<\/span><\/span>Hello<span class=\"token operator\">!<\/span><span class=\"token string-literal\"><span class=\"token string\">\"\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001Hello \u306e\u524d\u306b\u3042\u308b\u9589\u3058\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u304c\u6587\u5b57\u5217\u3092\u7d42\u4e86\u3055\u305b\u3001Hello! \u306e\u5f8c\u306e\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u306f\u3001\u7d42\u4e86\u3055\u305b\u308b\u5bfe\u5fdc\u3059\u308b\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u304c\u306a\u3044\u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u3001Ruby \u306f\u30a8\u30e9\u30fc\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u554f\u984c\u3092\u56de\u907f\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305a\u3001\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u4ee3\u66ff\u69cb\u6587\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3082\u3057\u6587\u5b57\u5217\u5185\u3067\u4e8c\u91cd\u5f15\u7528\u7b26\u3092\u4f7f\u7528\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u5834\u5408\u306f\u3001\u6587\u5b57\u5217\u306e\u5b9a\u7fa9\u306b\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3001\u305d\u306e\u9006\u3082\u540c\u69d8\u3067\u3059\u3002\u5f15\u7528\u7b26\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u65b9\u6cd5\u3084\u3001\u7570\u306a\u308bRuby\u306e\u69cb\u6587\u3092\u4f7f\u3063\u3066\u6587\u5b57\u5217\u3092\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5\u3082\u8003\u3048\u3089\u308c\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30aa\u30d7\u30b7\u30e7\u30f31\uff1a\u4ee3\u66ff\u6587\u5b57\u5217\u69cb\u6587\u3092\u4f7f\u3063\u3066\u4ee5\u4e0b\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u308b\u3002<\/h3>\n<p>\u3053\u308c\u3089\u306e\u554f\u984c\u3092\u56de\u907f\u3059\u308b\u6700\u3082\u7c21\u5358\u306a\u65b9\u6cd5\u306f\u3001\u6587\u5b57\u5217\u306b\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u3092\u542b\u3081\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u3067\u6587\u5b57\u5217\u3092\u56f2\u307f\u3001\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u3067\u6587\u5b57\u5217\u3092\u56f2\u3080\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u5358\u4e00\u5f15\u7528\u7b26\u3067\u3053\u306e\u6587\u5b57\u5217\u3092\u5b9a\u7fa9\u3059\u308b\u4ee3\u308f\u308a\u306b<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">'This isn'<\/span><\/span>t what <span class=\"token constant\">I<\/span> wanted<span class=\"token punctuation\">.<\/span>'\r\n<\/code><\/pre>\n<p>\u300c\u305d\u308c\u300d\u3092\u4e8c\u91cd\u5f15\u7528\u7b26\u3067\u5b9a\u7fa9\u3059\u308b\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">\"This isn't what I wanted.\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u3053\u306e\u6587\u5b57\u5217\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u4e8c\u91cd\u5f15\u7528\u7b26\u3092\u4f7f\u7528\u3059\u308b\u4ee3\u308f\u308a\u306b\u3001<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">\"Sammy says, \"<\/span><\/span>Hello<span class=\"token operator\">!<\/span><span class=\"token string-literal\"><span class=\"token string\">\"\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002 (Shinguru ku\u014dt\u0113shon o shiy\u014d shite kudasai.)<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">'Sammy says, \"Hello!\"'<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u9055\u3063\u305f\u69cb\u6587\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u4e00\u90e8\u306e\u77ed\u671f\u7684\u306a\u30c8\u30e9\u30d6\u30eb\u304b\u3089\u629c\u3051\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u5e38\u306b\u3046\u307e\u304f\u3044\u304f\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001\u3053\u306e\u6587\u5b57\u5217\u306b\u5bfe\u3057\u3066\u306f\u3069\u3061\u3089\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3082\u6a5f\u80fd\u3057\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">\"Sammy says, \"<\/span><\/span><span class=\"token constant\">I<\/span>'m a happy shark<span class=\"token operator\">!<\/span><span class=\"token string-literal\"><span class=\"token string\">\"\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001&#8221;I&#8217;m really&#8221; \u306e\u524d\u306e\u9589\u3058\u306e\u4e8c\u91cd\u5f15\u7528\u7b26\u304c\u6df7\u4e71\u3092\u5f15\u304d\u8d77\u3053\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u6700\u521d\u306e\u6587\u5b57\u5217\u304c\u7d42\u4e86\u3057\u3001\u305d\u306e\u5f8c\u3001Ruby\u306f\u300cm a happy shark!\u300d\u3068\u3044\u3046\u5024\u3067\u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u691c\u51fa\u3057\u307e\u3059\u304c\u3001\u3053\u306e\u65b0\u3057\u3044\u6587\u5b57\u5217\u306b\u306f\u5bfe\u5fdc\u3059\u308b\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u307e\u305f\u3001\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u3066\u6587\u5b57\u5217\u3092\u56f2\u3080\u3053\u3068\u3067\u3001\u4f3c\u305f\u3088\u3046\u306a\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">'Sammy says, \"I'<\/span><\/span>m a happy shark<span class=\"token operator\">!<\/span>\"'\r\n<\/code><\/pre>\n<p>\u4eca\u56de\u306f\u3001\u300cI&#8217;m\u300d\u306e\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u30fc\u304c\u6587\u5b57\u5217\u3092\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee3\u66ff\u69cb\u6587\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30b3\u30fc\u30c9\u306e\u4e00\u8cab\u6027\u304c\u5931\u308f\u308c\u308b\u53ef\u80fd\u6027\u3082\u3042\u308a\u307e\u3059\u3002\u6587\u5b57\u5217\u306e\u69cb\u6587\u3092\u983b\u7e41\u306b\u5207\u308a\u66ff\u3048\u308b\u3068\u6df7\u4e71\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u6587\u5b57\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30aa\u30d7\u30b7\u30e7\u30f32\uff1a\u6587\u5b57\u5217\u5185\u306e\u7279\u6b8a\u6587\u5b57\u306e\u30a8\u30b9\u30b1\u30fc\u30d7<\/h3>\n<p>\u30d0\u30c3\u30af\u30b9\u30e9\u30c3\u30b7\u30e5\u6587\u5b57 (\\) \u3001\u3057\u3070\u3057\u3070\u6587\u5b57\u5217\u5185\u306e\u30a8\u30b9\u30b1\u30fc\u30d7\u6587\u5b57\u3068\u3057\u3066\u8a00\u53ca\u3055\u308c\u3001Ruby\u304c\u6587\u5b57\u5217\u5185\u306e\u6b21\u306e\u6587\u5b57\u3092\u305d\u306e\u307e\u307e\u306b\u89e3\u91c8\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u3061\u3089\u306f\u554f\u984c\u306e\u3042\u308b\u6587\u5b57\u5217\u3067\u3059\u3002\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u307e\u308c\u3001\u4e2d\u306b\u3082\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">\"Sammy says, \"<\/span><\/span><span class=\"token constant\">I<\/span>'m a happy shark<span class=\"token operator\">!<\/span><span class=\"token string-literal\"><span class=\"token string\">\"\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u65b0\u3057\u3044Ruby\u30d7\u30ed\u30b0\u30e9\u30e0\u300cquoting.rb\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u300cquoting.rb\u300d\u3092\u65e5\u672c\u8a9e\u3067\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<pre class=\"post-pre\"><code>print <span class=\"token string-literal\"><span class=\"token string\">\"Sammy says, \"<\/span><\/span><span class=\"token constant\">I<\/span>'m a happy shark<span class=\"token operator\">!<\/span><span class=\"token string-literal\"><span class=\"token string\">\"\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">ruby quoting.rb<\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u3057\u3066\u3001\u3042\u306a\u305f\u306f\u3053\u306e\u51fa\u529b\u3092\u898b\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>quoting.rb:1: syntax error, unexpected tCONSTANT, expecting end-of-input print &#8220;Sammy says, &#8220;I&#8217;m a happy shark!&#8221;&#8221; ^<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30a8\u30e9\u30fc\u3092\u4fee\u6b63\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u5185\u90e8\u306e\u4e8c\u91cd\u5f15\u7528\u7b26\u306e\u524d\u306b\u30d0\u30c3\u30af\u30b9\u30e9\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\u300cquoting.rb\u300d\u3092\u65e5\u672c\u8a9e\u3067\u30cd\u30a4\u30c6\u30a3\u30d6\u306b\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u300c\u5f15\u7528.rb\u300d\u3068\u306a\u308a\u307e\u3059\u3002<\/div>\n<pre class=\"post-pre\"><code>print <span class=\"token string-literal\"><span class=\"token string\">\"Sammy says, \\\"I'm a happy shark!\\\"\"<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u518d\u5b9f\u884c\u3059\u308c\u3070\u3001\u4e88\u60f3\u3057\u3066\u3044\u305f\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>Sammy says, \"I'm a happy shark!\"\r\n<\/code><\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u30b3\u30f3\u30d5\u30ea\u30af\u30c8\u304c\u306a\u3044\u305f\u3081\u3001\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u30fc\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\u3053\u3068\u306b\u6c17\u3065\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u30eb\u30d3\u30fc\u304c\u6df7\u4e71\u3059\u308b\u3068\u601d\u308f\u308c\u308b\u5f15\u7528\u7b26\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5f15\u7528\u7b26\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u4ee3\u308f\u308a\u306b\u3001\u7570\u306a\u308b\u69cb\u6587\u3092\u4f7f\u3063\u3066\u6587\u5b57\u5217\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3067\u3001\u5b8c\u5168\u306b\u5f15\u7528\u7b26\u3092\u56de\u907f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30aa\u30d7\u30b7\u30e7\u30f33\uff1a\u6587\u5b57\u5217\u306e\u4ee3\u66ff\u69cb\u6587\u3092\u4f7f\u7528\u3059\u308b<\/h3>\n<p>\u3053\u308c\u307e\u3067\u306f\u5f15\u7528\u7b26\u3092\u4f7f\u7528\u3057\u3066\u3001\u6587\u5b57\u5217\u306e\u5883\u754c\u3092\u5b9a\u7fa9\u3057\u3066\u304d\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001Ruby\u3067\u306f\u4ed6\u306e\u6587\u5b57\u3082\u4f7f\u7528\u3057\u3066\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30d1\u30fc\u30bb\u30f3\u30c8\u8a18\u53f7\u306e\u5f8c\u306b\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u6587\u5b57\u5217\u3092\u56f2\u3080\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u533a\u5207\u308a\u6587\u5b57\u307e\u305f\u306f\u6587\u5b57\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">%$Sammy says, \"I'm a happy shark!\"$<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u3053\u306e\u69cb\u6587\u306f\u3001\u57cb\u3081\u8fbc\u307e\u308c\u305f\u6587\u5b57\u5217\u3092\u81ea\u52d5\u7684\u306b\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u307e\u3059\u3002\u5b9f\u969b\u306e\u6587\u5b57\u5217\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>\"Sammy says, \\\"I'm a happy shark!\\\"\"\r\n<\/code><\/pre>\n<p>\u305f\u3060\u3057\u3001\u30c7\u30ea\u30df\u30bf\u3092\u5909\u66f4\u3059\u308b\u3068\u3001\u30c7\u30ea\u30df\u30bf\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306b\u306f\u3001\u30c7\u30ea\u30df\u30bf\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u6587\u5b57\u5217\u5185\u306e\u6587\u5b57 &#8220;$&#8221; \u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306b\u306f\u3001\u6587\u5b57\u5217\u5185\u306e&#8221;$&#8221;\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u306f\u3001\u6ce2\u62ec\u5f27\u3001\u89d2\u62ec\u5f27\u3001\u307e\u305f\u306f\u4e38\u62ec\u5f27\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u533a\u5207\u308a\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u6ce2\u62ec\u5f27\u304c\u6700\u3082\u4e00\u822c\u7684\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">%{Sammy says, \"I'm a happy shark!\"}<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u5fc5\u8981\u306a\u5834\u5408\u306b\u306f\u3001\u3053\u308c\u3089\u306e\u5f62\u5f0f\u306f\u3059\u3079\u3066\u6587\u5b57\u5217\u306e\u5185\u633f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>droplets <span class=\"token operator\">=<\/span> <span class=\"token number\">5<\/span>\r\nprint <span class=\"token string-literal\"><span class=\"token string\">%{Sammy says, \"I just created <\/span><span class=\"token interpolation\"><span class=\"token delimiter punctuation\">#{<\/span><span class=\"token content\">droplets<\/span><span class=\"token delimiter punctuation\">}<\/span><\/span><span class=\"token string\"> droplets!\"}<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u307e\u305f\u3001Ruby\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u6587\u5b57\u5217\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b%Q{}\u3084%q{}\u3082\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002%Q{}\u306e\u6587\u6cd5\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u306e\u6587\u5b57\u5217\u3068\u307e\u3063\u305f\u304f\u540c\u3058\u3088\u3046\u306b\u6a5f\u80fd\u3059\u308b\u305f\u3081\u3001\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u3001\u6587\u5b57\u5217\u5185\u633f\u3082\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>droplets <span class=\"token operator\">=<\/span> <span class=\"token number\">5<\/span>\r\nprint <span class=\"token string-literal\"><span class=\"token string\">%Q{Sammy says, \"I just created <\/span><span class=\"token interpolation\"><span class=\"token delimiter punctuation\">#{<\/span><span class=\"token content\">droplets<\/span><span class=\"token delimiter punctuation\">}<\/span><\/span><span class=\"token string\"> droplets!\"}<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u300c%q{}\u300d\u306e\u69cb\u6587\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u3055\u308c\u305f\u6587\u5b57\u5217\u3068\u307e\u3063\u305f\u304f\u540c\u3058\u3088\u3046\u306b\u6a5f\u80fd\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token string-literal\"><span class=\"token string\">%q{Sammy says, \"I'm a happy shark!\"}<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u4e00\u90e8\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u3001\u4e2d\u30ab\u30c3\u30b3\u3084\u89d2\u30ab\u30c3\u30b3\u3092\u4f7f\u3063\u3066%q\u3068%Q\u69cb\u6587\u3092\u6ce2\u30ab\u30c3\u30b3\u306e\u4ee3\u308f\u308a\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Ruby\u3067\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u306f\u305f\u304f\u3055\u3093\u3042\u308a\u307e\u3059\u3002\u3069\u306e\u65b9\u6cd5\u3092\u9078\u3093\u3067\u3082\u3001\u30b3\u30fc\u30c9\u306e\u4e00\u8cab\u6027\u3092\u4fdd\u3064\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002%Q{}\u3068%{}\u30e1\u30bd\u30c3\u30c9\u304c\u6700\u3082\u4e00\u822c\u7684\u3067\u3042\u308b\u3053\u3068\u306b\u6c17\u3065\u304f\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u7279\u6b8a\u6587\u5b57\u306e\u6271\u3044\u65b9\u3092\u5b66\u3093\u3060\u306e\u3067\u3001\u9577\u3044\u6587\u5b57\u5217\u3084\u6539\u884c\u6587\u5b57\u306e\u6271\u3044\u65b9\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u9577\u3044\u6587\u5b57\u5217\u3068\u6539\u884c<\/h2>\n<p>\u6587\u5b57\u5217\u306b\u6539\u884c\u6587\u5b57\u3084\u30ad\u30e3\u30ea\u30c3\u30b8\u30ea\u30bf\u30fc\u30f3\u3092\u633f\u5165\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u30b3\u30fc\u30c9\u5185\u3067\u6539\u884c\u3092\u633f\u5165\u3059\u308b\u305f\u3081\u306b\u3001\\n\u307e\u305f\u306f\\r\u306e\u30a8\u30b9\u30b1\u30fc\u30d7\u6587\u5b57\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>output <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"This is\\na string\\nwith newlines\"<\/span><\/span>\r\nputs output\r\n<\/code><\/pre>\n<p>\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u3053\u306e\u51fa\u529b\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>This is a string with newlines<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u308c\u306f\u6280\u8853\u7684\u306b\u306f\u8907\u6570\u884c\u306e\u51fa\u529b\u3092\u5f97\u308b\u305f\u3081\u306b\u6a5f\u80fd\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u975e\u5e38\u306b\u9577\u3044\u6587\u5b57\u5217\u30921\u884c\u3067\u66f8\u304f\u3068\u3001\u8aad\u307f\u306b\u304f\u304f\u306a\u308b\u4e0a\u306b\u6271\u3044\u306b\u304f\u304f\u306a\u308a\u307e\u3059\u3002\u3044\u304f\u3064\u304b\u306e\u89e3\u6c7a\u7b56\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6700\u521d\u306b\u3001\u6587\u5b57\u5217\u3092\u8907\u6570\u884c\u306b\u5206\u5272\u3059\u308b\u305f\u3081\u306b\u3001\u7d50\u5408\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>output <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">\"This is a\\n\"<\/span><\/span> <span class=\"token operator\">+<\/span>\r\n<span class=\"token string-literal\"><span class=\"token string\">\"longer string\\n\"<\/span><\/span> <span class=\"token operator\">+<\/span>\r\n<span class=\"token string-literal\"><span class=\"token string\">\"with newlines.\"<\/span><\/span>\r\nputs output\r\n<\/code><\/pre>\n<p>\u3053\u308c\u306f\u3001\u3059\u3067\u306b\u884c\u3063\u305f\u3053\u3068\u3068\u540c\u69d8\u306b\u3001\uff13\u3064\u306e\u6587\u5b57\u5217\u3092\u9023\u7d50\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u6587\u5b57\u5217\u306b\u6539\u884c\u3092\u76f4\u63a5\u5165\u308c\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>output <span class=\"token operator\">=<\/span> \"This is a\r\nlonger string\r\nwith newlines\"\r\nputs output\r\n<\/code><\/pre>\n<p>\u591a\u304f\u306e\u4ed6\u306e\u6587\u5b57\u5217\u69cb\u6587\u3092\u4f7f\u7528\u3057\u3066\u3001\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>output <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">%{This is a\r\nlonger string\r\nwith newlines}<\/span><\/span>\r\nputs output\r\n<\/code><\/pre>\n<p>\u3053\u308c\u3089\u306e\u4f8b\u306e\u3044\u305a\u308c\u306b\u304a\u3044\u3066\u3082\u3001\u6539\u884c\u6587\u5b57\uff08\\n\uff09\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u306f\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\u3084\u6539\u884c\u3092\u542b\u3080\u7a7a\u767d\u3092\u4fdd\u6301\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u7d50\u679c\u3001\u51fa\u529b\u306b\u306f\u6539\u884c\u3068\u5148\u982d\u306e\u30a4\u30f3\u30c7\u30f3\u30c8\u304c\u542b\u307e\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>This is a longer string with newlines<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u308c\u3092\u9632\u3050\u305f\u3081\u306b\u3001\u30b3\u30fc\u30c9\u304b\u3089\u4f59\u5206\u306a\u7a7a\u767d\u3092\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>output <span class=\"token operator\">=<\/span> <span class=\"token string-literal\"><span class=\"token string\">%{This is a\r\nlonger string\r\nwith newlines\r\n}<\/span><\/span>\r\n<\/code><\/pre>\n<p>\u300c\u30d2\u30a2\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u300d\u3068\u547c\u3070\u308c\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u306e\u8907\u6570\u884c\u6587\u5b57\u5217\u30ea\u30c6\u30e9\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3001\u8907\u6570\u884c\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u305d\u306e\u30b3\u30fc\u30c9\u306e\u66f8\u304d\u65b9\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>output <span class=\"token operator\">=<\/span> <span class=\"token string-literal heredoc-string\"><span class=\"token delimiter\"><span class=\"token punctuation\">&lt;&lt;-<\/span><span class=\"token symbol\">END<\/span><\/span><span class=\"token string\">\r\nThis is a\r\nlonger string\r\nwith newlines\r\n<\/span><span class=\"token delimiter\"><span class=\"token symbol\">END<\/span><\/span><\/span>\r\n<\/code><\/pre>\n<p>\u300c&lt;&lt;-END\u300d\u3068\u300cEND\u300d\u306e\u30de\u30fc\u30ab\u30fc\u306f\u3001\u30d2\u30a2\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u958b\u59cb\u3068\u7d42\u4e86\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Ruby\u306eHeredocs\u306f\u3001\u7a7a\u767d\u6587\u5b57\u3082\u4fdd\u6301\u3055\u308c\u308b\u305f\u3081\u3001Heredoc\u5185\u306e\u30b3\u30fc\u30c9\u3092\u30a4\u30f3\u30c7\u30f3\u30c8\u3059\u308b\u3068\u3001\u5148\u982d\u306e\u30a4\u30f3\u30c7\u30f3\u30c8\u3082\u4fdd\u6301\u3055\u308c\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u6b21\u306e\u30b3\u30fc\u30c9:<\/p>\n<pre class=\"post-pre\"><code>output <span class=\"token operator\">=<\/span> <span class=\"token string-literal heredoc-string\"><span class=\"token delimiter\"><span class=\"token punctuation\">&lt;&lt;-<\/span><span class=\"token symbol\">END<\/span><\/span><span class=\"token string\">\r\nThis is a\r\nlonger string\r\nwith newlines\r\n<\/span><span class=\"token delimiter\"><span class=\"token symbol\">END<\/span><\/span><\/span>\r\n<\/code><\/pre>\n<p>\u30a4\u30f3\u30c7\u30f3\u30c8\u30922\u3064\u306e\u30b9\u30da\u30fc\u30b9\u3067\u5370\u5237\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>Ruby 2.3\u4ee5\u4e0a\u3067\u306f\u3001&#8221;squiggly\u30d2\u30a2\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8&#8221;\u69cb\u6587\u304c\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u5148\u982d\u306e\u7a7a\u767d\u3092\u81ea\u52d5\u7684\u306b\u524a\u9664\u3057\u307e\u3059\u3002\u30d2\u30a2\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u5b9a\u7fa9\u5185\u306e\u30cf\u30a4\u30d5\u30f3\u3092\u30c1\u30eb\u30c0\u3067\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u3057\u305f\u304c\u3063\u3066\u3001&lt;&lt;-\u304c&lt;&lt;~\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>output <span class=\"token operator\">=<\/span> <span class=\"token string-literal heredoc-string\"><span class=\"token delimiter\"><span class=\"token punctuation\">&lt;&lt;~<\/span><span class=\"token symbol\">END<\/span><\/span><span class=\"token string\">\r\nThis is a\r\nlonger string\r\nwith newlines\r\nand the code is indented\r\nbut the output is not.\r\n<\/span><span class=\"token delimiter\"><span class=\"token symbol\">END<\/span><\/span><\/span>\r\n<\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u6b21\u306e\u51fa\u529b\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>This is a longer string with newlines and the code is indented but the output is not.<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30d2\u30a2\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30b3\u30fc\u30c9\u3092\u304d\u308c\u3044\u306b\u30a4\u30f3\u30c7\u30f3\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Ruby\u306eHeredocs\u3067\u306f\u3001\u6587\u5b57\u5217\u5185\u633f\u3082\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u65b0\u3057\u3044\u884c\u3068\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u6271\u3046\u305f\u3081\u306b\u306f\u3001Ruby\u306b\u306f\u3055\u307e\u3056\u307e\u306a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u65e2\u5b58\u306eRuby\u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u306f\u3001\u3053\u308c\u3089\u306e\u65b9\u6cd5\u3059\u3079\u3066\u306b\u906d\u9047\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002\u306a\u305c\u306a\u3089\u3001\u5404\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u306f\u305d\u308c\u305e\u308c\u72ec\u81ea\u306e\u30b9\u30bf\u30a4\u30eb\u304c\u3042\u308a\u307e\u3059\u304b\u3089\u3002\u81ea\u5206\u81ea\u8eab\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u81ea\u5206\u306b\u5408\u3063\u305f\u30b9\u30bf\u30a4\u30eb\u3092\u9078\u3073\u3001\u4e00\u8cab\u6027\u3092\u6301\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u6587\u5b57\u5217\u306e\u8907\u88fd<\/h2>\n<p>Ruby\u3092\u4f7f\u7528\u3057\u3066\u6587\u5b57\u5217\u3092\u7e70\u308a\u8fd4\u3059\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u306f*\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002+\u6f14\u7b97\u5b50\u3068\u540c\u69d8\u306b\u3001*\u6f14\u7b97\u5b50\u306f\u6570\u5b57\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u7570\u306a\u308b\u4f7f\u3044\u65b9\u3092\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001*\u6f14\u7b97\u5b50\u306f\u6587\u5b57\u5217\u3068\u6574\u6570\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u5834\u5408\u3001\u6587\u5b57\u5217\u306e\u8907\u88fd\u6f14\u7b97\u5b50\u3068\u306a\u308a\u3001\u63d0\u4f9b\u3055\u308c\u305f\u6574\u6570\u3092\u4f7f\u7528\u3057\u3066\u6587\u5b57\u5217\u3092\u6307\u5b9a\u56de\u6570\u7e70\u308a\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u300cSammy\u300d\u30929\u56de\u5370\u5237\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>print <span class=\"token string-literal\"><span class=\"token string\">\"Sammy\"<\/span><\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">9<\/span>\r\n<\/code><\/pre>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u306f\u3001\u6b21\u306e\u51fa\u529b\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>SammySammySammySammySammySammySammySammySammy<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>ASCII\u30a2\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u3053\u308c\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002banner.rb\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>puts <span class=\"token string-literal\"><span class=\"token string\">\"=\"<\/span><\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">15<\/span>\r\nputs <span class=\"token string-literal\"><span class=\"token string\">\"| Hello World |\"<\/span><\/span>\r\nputs <span class=\"token string-literal\"><span class=\"token string\">\"=\"<\/span><\/span> <span class=\"token operator\">*<\/span> <span class=\"token number\">15<\/span>\r\n<\/code><\/pre>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u3001\u305d\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u4f55\u3092\u751f\u6210\u3059\u308b\u304b\u60f3\u50cf\u3067\u304d\u307e\u3059\u304b\uff1f<\/p>\n<p>\u3053\u306e\u51fa\u529b\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>=============== | Hello World | ===============<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u308c\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306b\u7e70\u308a\u8fd4\u3057\u306e\u30bf\u30b9\u30af\u3092\u81ea\u52d5\u5b9f\u884c\u3055\u305b\u308b\u65b9\u6cd5\u306e\u5c0f\u3055\u306a\u4f8b\u3067\u3059\u3002<\/p>\n<h2>\u7d50\u8ad6<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Ruby\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u6587\u5b57\u5217\u30c7\u30fc\u30bf\u578b\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3057\u305f\u3002\u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3057\u3001\u4ed6\u306e\u6587\u5b57\u5217\u3068\u9023\u7d50\u3055\u305b\u3001\u6539\u884c\u3001\u5f15\u7528\u7b26\u3001\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u6587\u5b57\u5217\u5185\u633f\u3092\u4f7f\u7528\u3057\u3066\u6587\u5b57\u5217\u3068\u5909\u6570\u306e\u5024\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u65b9\u6cd5\u3082\u7fd2\u5f97\u3057\u3001\u6587\u5b57\u5217\u306e\u7e70\u308a\u8fd4\u3057\u65b9\u6cd5\u3082\u5b66\u3073\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30c8\u30ed\u30c0\u30af\u30b7\u30e7\u30f3 \u6587\u5b57\u5217\u306f\u3001\u6587\u5b57\u3001\u6570\u5b57\u3001\u307e\u305f\u306f\u8a18\u53f7\u304b\u3089\u306a\u308b\u4e00\u3064\u4ee5\u4e0a\u306e\u9023\u7d9a\u3057\u305f\u6587\u5b57\u306e\u5217\u3067\u3059\u3002 Ruby\u306e\u6587\u5b57\u5217\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\u3001\u4ed6\u306e\u8a00\u8a9e\u3068\u306f\u7570\u306a\u308a\u3001\u6587\u5b57\u5217\u306f\u53ef\u5909\u3067\u3042\u308a\u3001\u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u4ee3\u308f\u308a\u306b\u305d\u306e\u5834\u3067\u5909\u66f4\u3059\u308b\u3053 [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[16,26],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-16","tag-26"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\" \/>\n<meta property=\"og:description\" content=\"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-25T18:26:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T04:39:48+00:00\" \/>\n<meta name=\"author\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"31\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/\",\"name\":\"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2022-08-25T18:26:29+00:00\",\"dateModified\":\"2025-07-31T04:39:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\"},\"description\":\"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\",\"name\":\"\u82bd\u4f9d, \u96e8\u591c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"caption\":\"\u82bd\u4f9d, \u96e8\u591c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud","description":"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\/","og_locale":"ja_JP","og_type":"article","og_title":"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9","og_description":"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-08-25T18:26:29+00:00","article_modified_time":"2025-07-31T04:39:48+00:00","author":"\u82bd\u4f9d, \u96e8\u591c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u82bd\u4f9d, \u96e8\u591c","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"31\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/","name":"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2022-08-25T18:26:29+00:00","dateModified":"2025-07-31T04:39:48+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27"},"description":"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Ruby\u3067\u6587\u5b57\u5217\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f7f\u3044\u65b9"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27","name":"\u82bd\u4f9d, \u96e8\u591c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","caption":"\u82bd\u4f9d, \u96e8\u591c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/ruby%e3%81%a7%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":35783,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/49\/revisions\/35783"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}