{"id":14078,"date":"2017-01-10T16:26:41","date_gmt":"2017-01-10T07:26:41","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=14078"},"modified":"2024-05-06T11:40:03","modified_gmt":"2024-05-06T02:40:03","slug":"%e5%9f%ba%e7%a4%8e%e3%81%8b%e3%82%89%e3%82%8f%e3%81%8b%e3%82%8b%ef%bc%81ruby%e3%81%a7%e6%a8%99%e6%ba%96%e5%85%a5%e5%8a%9b%e3%82%92%e6%89%b1%e3%81%86%e6%96%b9%e6%b3%95%ef%bc%88%e8%a4%87%e6%95%b0","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/14078","title":{"rendered":"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01Web\u30b3\u30fc\u30c0\u30fc\u30fb\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u8c9d\u539f\uff08<a href=\"https:\/\/twitter.com\/touhicomu\" target=\"_blank\" rel=\"noopener noreferrer\">@touhicomu<\/a>\uff09\u3067\u3059\u3002<\/p>\n<p>\u4eca\u65e5\u306f\u3001Ruby\u306e\u6a19\u6e96\u5165\u529b\u306b\u3064\u3044\u3066\u3001\u66f8\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u3044\u304d\u306a\u308a<b>\u300c\u6a19\u6e96\u5165\u529b\u300d\u3068\u8a00\u3063\u3066\u3082\u3001\u4f55\u304c\u300c\u6a19\u6e96\u300d\u3067\u4f55\u304c\u300c\u5165\u529b\u300d<\/b>\u306a\u306e\u304b\u3001\u308f\u304b\u308a\u3065\u3089\u3044\u3067\u3059\u3088\u306d\u3002\u305d\u306e\u305f\u3081\u3001<div class=\"box_voice\">Ruby\u3067\u3069\u3046\u3084\u3063\u3066\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u306e\uff1f<\/div>\u3068\u7591\u554f\u304c\u6d6e\u304b\u3093\u3067\u3057\u307e\u3044\u307e\u3059\u3002\u305d\u3053\u3067\uff01\u4eca\u56de\u306f\u3001<br \/>\n<div class=\"box01\"><\/p>\n<ul>\n<li><b>Ruby\u306b\u304a\u3051\u308b\u6a19\u6e96\u5165\u529b\u306e\u610f\u5473<\/b><\/li>\n<li><b>\u6a19\u6e96\u5165\u529b\u3092\u5229\u7528\u3057\u3066\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u306e\u5165\u529b\u3092Ruby\u3067\u53d7\u3051\u53d6\u308b\u65b9\u6cd5<\/b><\/li>\n<li><b>\u8907\u6570\u884c\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u306e\u5165\u529b\u3092\u6a19\u6e96\u5165\u529b\u3068\u3057\u3066Ruby\u306e\u914d\u5217\u3067\u53d7\u3051\u53d6\u308b\u65b9\u6cd5<\/b><\/li>\n<\/ul>\n<\/div>\n<p>\u3068\u3044\u3046\u57fa\u672c\u7684\u306a\u5185\u5bb9\u304b\u3089\u3001<br \/>\n<div class=\"box01\"><\/p>\n<ul>\n<li><b>\u6a19\u6e96\u5165\u529b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6301\u3063\u3066\u3044\u308b\u5909\u6570$stdin\u3001\u5b9a\u6570STDIN\u3092\u4f7f\u3063\u3066\u6a19\u6e96\u5165\u529b\u304b\u3089\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5165\u529b\u3092\u53d7\u3051\u53d6\u308b\u65b9\u6cd5<\/b><\/li>\n<li><b>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u5f15\u6570\u3092Ruby\u3067\u53d7\u3051\u53d6\u308b\u65b9\u6cd5<\/b><\/li>\n<li><b>while\u3068gets\u3001line\u3092\u4f7f\u3063\u3066\u3001\u4f55\u5ea6\u3082\u6a19\u6e96\u5165\u529b\u304b\u3089\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5165\u529b\u3092\u53d7\u3051\u53d6\u308b\u65b9\u6cd5<\/b><\/li>\n<\/ul>\n<\/div>\n<p>\u3068\u3044\u3063\u305f\u5fdc\u7528\u7684\u306a\u5185\u5bb9\u306b\u3064\u3044\u3066\u3082\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>\u6a19\u6e96\u5165\u529b\u3068\u306f<\/h2>\n<p>\u6a19\u6e96\u5165\u529b\u3068\u306f\u3001<b>UNIX\u306b\u304a\u3051\u308b\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b<\/b>\u306e\u3053\u3068\u3067\u3059\u3002\u8a66\u3057\u306b\u30bf\u30fc\u30df\u30ca\u30eb\u3067 cat \u30b3\u30de\u30f3\u30c9\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f7f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>cat \u30b3\u30de\u30f3\u30c9\u3092\u300ccat \u2013\u300d\u3067\u8d77\u52d5\u3059\u308b\u3068\u3001\u6a19\u6e96\u5165\u529b\u3067\u3042\u308b\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5165\u529b\u3092\u3001\u305d\u306e\u307e\u307e\u753b\u9762\u306b\u8868\u793a\u3057\u307e\u3059\u3002\uff08cat \u30b3\u30de\u30f3\u30c9\u306f\u3001\u5165\u529b\u3055\u308c\u305f\u6587\u5b57\u5217\u3092\u305d\u306e\u307e\u307e\u753b\u9762\u306b\u51fa\u529b\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\uff09<\/p>\n<pre class=\"lang:ruby decode:true \">$ cat -<\/pre>\n<p>\u3059\u308b\u3068\u3001\u300ccat -\u300d\u3068\u5165\u529b\u3057\u305f\u76f4\u4e0b\u3067\u3001\u5165\u529b\u30ab\u30fc\u30bd\u30eb\u304c\u70b9\u6ec5\u3057\u307e\u3059\u3002\u3053\u3053\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u6587\u5b57\u3092\u5165\u529b\u3067\u304d\u307e\u3059\u3002\u8a66\u3057\u306b\u300chello, world\u300d\u3068\u5165\u529b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u5165\u529b\u306e\u6700\u5f8c\u3067\u306f\u6539\u884c\u30ad\u30fc\u3092\u62bc\u4e0b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ cat -\r\nhello, world\r\nhello, world<\/pre>\n<p>1\u756a\u76ee\u306e\u300chello, world\u300d\u306f\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u5165\u529b\u3057\u305f\u6587\u5b57\u3067\u3059\u30022\u756a\u76ee\u306e\u300chello, world\u300d\u304c\u3001cat \u30b3\u30de\u30f3\u30c9\u304c\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u304b\u3089\u5f97\u305f\u6587\u5b57\u3092\u305d\u306e\u307e\u307e\u753b\u9762\u306b\u8868\u793a\u3057\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u6a19\u6e96\u5165\u529b\u3068\u306f\u3001<b>\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u5165\u529b\u3057\u305f\u6587\u5b57\u3092\u30b3\u30de\u30f3\u30c9\u3078\u6e21\u3059\u3084\u308a\u65b9<\/b>\u306a\u306e\u3067\u3059\u3002\u3053\u308c\u3060\u3051\u3067\u306f\u3001\u308f\u304b\u308a\u306b\u304f\u3044\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u6b21\u7ae0\u4ee5\u964d\u3067\u3001\u5b9f\u969b\u306bRuby\u3067\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u6a19\u6e96\u5165\u529b\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n<h3>Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u5229\u7528\u3059\u308b<\/h3>\n<p>Ruby\u3067\u306f\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u5165\u529b\u3057\u305f\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u3053\u3068\u306e\u3067\u304d\u308b\u30e1\u30bd\u30c3\u30c9\u304c\u8907\u6570\u3042\u308a\u307e\u3059\u3002\u30ad\u30fc\u30dc\u30fc\u30c9\u306f\u4e00\u3064\u306a\u306e\u306b\u3001\u30e1\u30bd\u30c3\u30c9\u304c\u8907\u6570\u3042\u308b\u3053\u3068\u3067\u6df7\u4e71\u3057\u3066\u3057\u307e\u3044\u305d\u3046\u3067\u3059\u306d\u3002<\/p>\n<p>\u3067\u3082\u3001\u6574\u7406\u3057\u3066\u899a\u3048\u308c\u3070\u610f\u5916\u306b\u3059\u3093\u306a\u308a\u899a\u3048\u3089\u308c\u307e\u3059\u3002\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u5165\u529b\u3057\u305f\u6587\u5b57\u5217\u306e\u5165\u308a\u53e3\u304c\u4e00\u3064\u3067\u3001\u305d\u306e\u5165\u308a\u53e3\u306b\u5165\u3063\u3066\u304d\u305f<b>\u6587\u5b57\u5217\u3092\u53d6\u308a\u6271\u3046\u3053\u3068\u306e\u3067\u304d\u308b\u65b9\u6cd5\uff08\u30e1\u30bd\u30c3\u30c9\uff09<\/b>\u304c\u8907\u6570\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u4e00\u3064\u304cgets\u3067\u3059\u3002gets\u306f\u3001\u300cget string\u300d\u306e\u7565\u3067\u3001\u610f\u5473\u306f\u305d\u306e\u307e\u307e\u3001<b>\u300c\u6a19\u6e96\u5165\u529b\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u3055\u308c\u305f\u6587\u5b57\u5217\u3092\u53d6\u5f97\u3059\u308b\u300d<\/b>\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<\/p>\n<p>\u3053\u306egets\u3092\u4f7f\u3063\u3066\u3001\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d44\u3093\u3067\u3001Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u306a\u304a\u3001gets\u306f\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5165\u529b\u30921\u884c\u305a\u3064\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">p '\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002'\r\ninput = gets \r\np input<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ ruby gets.rb\r\n\"\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\r\n\u3053\u3093\u306b\u3061\u306f\u3002\r\n\"\u3053\u3093\u306b\u3061\u306f\u3002n\"<\/pre>\n<p>gets \u3067\u5f97\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u5165\u529b\u3057\u305f\u6587\u5b57\u5217\u300c\u3053\u3093\u306b\u3061\u306f\u3002\u300d\u3092\u5909\u6570input\u306b\u5165\u308c\u3001p\u3067input\u3092\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002\u300cn\u300d\u306f\u6539\u884c\u6587\u5b57\u3067\u3059\u3002p\u306b\u3088\u308b\u51fa\u529b\u306e\u4e2d\u306b\u6539\u884c\u6587\u5b57\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u306d\u3002\u6539\u884c\u6587\u5b57\u3092\u53d6\u308a\u9664\u304d\u305f\u3044\uff01\u3068\u3044\u3046\u3068\u304d\u306f\u3001chomp!\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3067\u7c21\u5358\u306b\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>chomp!\u306f\u3001\u6587\u5b57\u5217\u306b\u4f7f\u7528\u3059\u308b\u3068\u3001<br \/>\n<div class=\"box01\"><\/p>\n<ul>\n<li><b>\u6587\u5b57\u5217\u306e\u672b\u5c3e\u306b\u6539\u884c\u6587\u5b57\u304c\u3042\u3063\u305f\u5834\u5408\u3001\u6539\u884c\u6587\u5b57\u3092\u524a\u9664\u3059\u308b<\/b><\/li>\n<li><b>\u6587\u5b57\u5217\u306e\u672b\u5c3e\u306b\u6539\u884c\u6587\u5b57\u304c\u306a\u304b\u3063\u305f\u5834\u5408\u3001\u306a\u306b\u3082\u3057\u306a\u3044<\/b><\/li>\n<\/ul>\n<\/div>\n<p>\u3068\u3044\u3046\u52d5\u4f5c\u3092\u3057\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u3001chomp!\u306fgets\u306a\u3069\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u4ed5\u69d8\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u751f\u307f\u51fa\u3055\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">p '\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002'\r\ninput = gets\r\np input.chomp!<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ ruby gets_chomp.rb\r\n\"\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\r\n\u3053\u3093\u306b\u3061\u306f\u3002\r\n\"\u3053\u3093\u306b\u3061\u306f\u3002\"<\/pre>\n<p>chomp!\u4ed8\u304d\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u7d50\u679c\u3067\u306f\u3001\u5909\u6570input\u306e\u672b\u5c3e\u306e\u6539\u884c\u6587\u5b57\u300cn\u300d\u304c\u524a\u9664\u3055\u308c\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<h3>\u8907\u6570\u884c\u5165\u529b<\/h3>\n<p>gets\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u306e\u5165\u529b\u6587\u5b57\u3092\u30011\u884c\u3057\u304b\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3057\u304b\u3057\u3001readlines\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308c\u3070\u3001\u8907\u6570\u884c\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u306e\u5165\u529b\u6587\u5b57\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>redalines\u306f\u3001\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u30011\u884c\u3054\u3068\u306e\u914d\u5217\u3068\u3057\u3066\u53d6\u5f97\u3057\u307e\u3059\u3002\u914d\u5217\u306e\u8981\u7d20\u306f\u30011\u884c\u5206\u306e\u6587\u5b57\u5217\u3067\u3059\u3002\u6ce8\u610f\u70b9\u3068\u3057\u3066\u3001gets\u3068\u9055\u3044\u3001<strong>\u6539\u884c\u3092\u5165\u529b\u3057\u3066\u3082\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u306e\u5165\u529b\u306f\u7d42\u4e86\u3057\u306a\u3044<\/strong>\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u4ee3\u308f\u308a\u306b\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u306e\u5165\u529b\u3092\u7d42\u4e86\u3059\u308b\u306b\u306f\u3001\u300cCtrl+D\uff08\u3042\u308b\u3044\u306fCTRL+Z\uff09\u300d\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<p>[\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9]<\/p>\n<pre class=\"lang:ruby decode:true \">p '\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044'\r\ninput = readlines\r\np input<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ ruby readines.rb\r\n\"\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\"\r\na1\r\na2\r\na3\r\n[\"a1n\", \"a2n\", \"a3n\"]<\/pre>\n<p>\u300ca3\u300d\u306e\u672b\u5c3e\u306e\u3068\u3053\u308d\u3067\u3001Ctrl+D\u3092\u5165\u529b\u3057\u3066\u3044\u307e\u3059\u3002\u8907\u6570\u884c\u5165\u529b\u3057\u305f\u7d50\u679c\u306f\u3001\u6587\u5b57\u5217\u306e\u914d\u5217\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u6a19\u6e96\u5165\u529b\u3092\u8868\u3059\u5909\u6570$stdin\u3001\u5b9a\u6570STDIN<\/h2>\n<p>Ruby\u3067\u306f\u3001\u6a19\u6e96\u5165\u529b\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u3042\u3089\u304b\u3058\u3081\u6301\u3063\u3066\u3044\u307e\u3059\u3002Ruby\u3067\u6a19\u6e96\u5165\u529b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f<b>\u3001$stdin\u5909\u6570\u304b\u3001STDIN\u5b9a\u6570\u306b\u30a2\u30af\u30bb\u30b9<\/b>\u3057\u307e\u3059\u3002<\/p>\n<p>\u300cstdin\u300d\u3068\u306f\u3001\u300cStandard Input\u300d\u306e\u7565\u8a9e\u3067\u3001\u300c\u6a19\u6e96\u5165\u529b\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002\u4ee5\u4e0b\u3001\u5177\u4f53\u4f8b\u3092\u5165\u308c\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>$stdin\u3068gets<\/h3>\n<p>\u4eca\u307e\u3067\u3001gets\u306b\u306f\u30ec\u30b7\u30fc\u30d0\u3068\u306a\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30ec\u30b7\u30fc\u30d0\u3092\u6307\u5b9a\u3057\u306a\u3044gets\u306f\u6a19\u6e96\u5165\u529b\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5165\u529b\u5148\u3068\u3057\u3066\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<p>\u4eca\u5ea6\u306f\u3001\u3088\u308a\u5177\u4f53\u7684\u306bgets\u306b\u30ec\u30b7\u30fc\u30d0\u306e$stdin\u3092\u6307\u5b9a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u4ee5\u4e0b\u306e\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u898b\u3066\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">p \"\u4f55\u304b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\r\ninput = $stdin.gets\r\np input<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ ruby ruby_stdin_gets.rb\r\n\"\u4f55\u304b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\r\n\u3053\u3093\u306b\u3061\u306f\u3002\r\n\"\u3053\u3093\u306b\u3061\u306f\u3002n\"<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001gets\u306e\u30ec\u30b7\u30fc\u30d0\u306b$stdin\u3092\u6307\u5b9a\u3057\u3066\u4f7f\u7528\u3057\u305f\u3068\u304d\u3067\u3082\u3001\u30ec\u30b7\u30fc\u30d0\u306a\u3057\u306egets\u3092\u4f7f\u3063\u305f\u3068\u304d\u3068\u540c\u3058\u304f\u3001\u6a19\u6e96\u5165\u529b\u304b\u3089\u306e\u5165\u529b\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u53d6\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u5b9a\u6570STDIN\u3092\u4f7f\u3063\u305f\u3068\u304d\u3067\u3082\u540c\u69d8\u3067\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">p \"\u4f55\u304b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\r\ninput = STDIN.gets\r\np input<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ ruby ruby_stdin_gets2.rb\r\n\"\u4f55\u304b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\r\n\u3053\u3093\u3070\u3093\u306f\u3002\r\n\"\u3053\u3093\u3070\u3093\u306f\u3002n\"<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001gets\u306e\u30ec\u30b7\u30fc\u30d0\u306b\u5b9a\u6570STDIN\u3092\u6307\u5b9a\u3057\u3066\u4f7f\u7528\u3057\u305f\u3068\u304d\u3067\u3082\u3001gets\u306e\u30ec\u30b7\u30fc\u30d0\u306b\u5909\u6570$stdin\u3092\u6307\u5b9a\u3057\u3066\u4f7f\u7528\u3057\u305f\u3068\u304d\u3068\u540c\u3058\u52d5\u4f5c\u3092\u3057\u307e\u3059\u3002<\/p>\n<h3>$stdin\u3068readlines\u3001read<\/h3>\n<p>gets\u306f$stdin\u3084STDIN\u3092\u30ec\u30b7\u30fc\u30d0\u306b\u3057\u3066\u3082\u3001\u30ec\u30b7\u30fc\u30d0\u304c\u306a\u3044\u3068\u304d\u3068\u540c\u3058\u52d5\u4f5c\u3092\u3057\u307e\u3057\u305f\u3002readlines\u30e1\u30bd\u30c3\u30c9\u306b\u3001$stdin\u3001STDIN\u3092\u30ec\u30b7\u30fc\u30d0\u306b\u6307\u5b9a\u3057\u305f\u5834\u5408\u3082\u3001\u30ec\u30b7\u30fc\u30d0\u306e\u306a\u3044readlines\u3068\u540c\u3058\u52d5\u4f5c\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u78ba\u304b\u3081\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">p '\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044'\r\ninput = $stdin.readlines\r\np input<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">\"\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\"\r\na1\r\na2\r\na3\r\n [\"a1n\", \"a2n\", \"a3n\"]<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001readlines\u306e\u30ec\u30b7\u30fc\u30d0\u306b$stdin\u3092\u6307\u5b9a\u3057\u305f\u3068\u304d\u3067\u3082\u3001readliines\u306b\u30ec\u30b7\u30fc\u30d0\u3092\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3068\u540c\u3058\u304f\u3001\u6a19\u6e96\u5165\u529b\u304b\u3089\u306e\u8907\u6570\u884c\u306e\u5165\u529b\u3092\u914d\u5217\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001read\u30e1\u30bd\u30c3\u30c9\u306e\u30ec\u30b7\u30fc\u30d0\u306b$stdin\u3092\u6307\u5b9a\u3057\u305f\u969b\u306e\u52d5\u4f5c\u3092\u3001\u5b9f\u969b\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002read\u30e1\u30bd\u30c3\u30c9\u306f\u3001<b>\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u4e00\u6c17\u306b\u8aad\u307f\u8fbc\u3093\u3067\u6587\u5b57\u5217\u3068\u3057\u3066\u8fd4\u3059<\/b>\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u5834\u5408\u306f\u3001\u6a19\u6e96\u5165\u529b\u306e\u5165\u529b\u304b\u3089CTRL+D\uff08\u3042\u308b\u3044\u306fCTRL+Z\uff09\u307e\u3067\u3092\u4e00\u6c17\u306b\u8aad\u307f\u8fbc\u3093\u3067\u6587\u5b57\u5217\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">p '\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044'\r\ninput = $stdin.read\r\np input<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">\"\u6587\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\"\r\nline1\r\nline2\r\nline3\r\n\"line1nline2nline3n\"<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001read\u306e\u30ec\u30b7\u30fc\u30d0\u306b$stdin\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u6a19\u6e96\u5165\u529b\u304b\u3089CTRL+D\uff08\u3042\u308b\u3044\u306fCTRL+Z\uff09\u304c\u5165\u529b\u3055\u308c\u308b\u307e\u3067\u306e\u9593\u306e\u8907\u6570\u884c\u306e\u5165\u529b\u3092\u3059\u3079\u3066\u4e00\u6c17\u306b\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u8aad\u307f\u8fbc\u3093\u3060\u5185\u5bb9\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u6a19\u6e96\u5165\u529b\u306e\u5fdc\u7528\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n<h3>\u3082\u3046\u4e00\u3064\u306e\u6a19\u6e96\u5165\u529b\u3001ARGV<\/h3>\n<p>Ruby\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\u6642\u306b\u3082\u3001\u6a19\u6e96\u5165\u529b\u304b\u3089\u3001Ruby\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u5024\u3092\u4e0e\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3067Ruby\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u969b\u306b\u3001<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ ruby argv.rb a<\/pre>\n<p>\u306a\u3069\u306e\u3088\u3046\u306b\u6307\u5b9a\u3059\u308c\u3070\u3001Ruby\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u3001\u5024\u300ca\u300d\u304c\u6e21\u308a\u307e\u3059\u3002\u3053\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067\u4e0e\u3048\u3089\u308c\u305f\u5024\u306f\u3001Ruby\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306f\u3001\u300cARGV\u300d\u3068\u3044\u3046\u5909\u6570\u306b\u914d\u5217\u3068\u3057\u3066\u4fdd\u6301\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306bRuby\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d44\u3093\u3067\u3001\u6a19\u6e96\u5165\u529b\u304b\u3089\u5024\u300ca\u300d\u304c\u6e21\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>[\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9]<\/p>\n<pre class=\"lang:ruby decode:true \">p ARGV[0]<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ ruby argv.rb a\r\n\"a\"<\/pre>\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306b\u3001\u5024\u300ca\u300d\u306f\u3001Ruby\u30b9\u30af\u30ea\u30d7\u30c8\u306eARGV\u914d\u5217\u306e0\u756a\u76ee\u306b\u3001\u6587\u5b57\u5217\u300c\u201da\u201d\u300d\u3068\u3057\u3066\u5165\u3063\u3066\u3044\u307e\u3059\u3002\u6b21\u306b\u3001\u5fdc\u7528\u3068\u3057\u3066\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u306e\u6a19\u6e96\u5165\u529b\u304b\u3089\u8907\u6570\u306e\u5024\u3092\u6e21\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067\u3001\u5024\u3092\u7a7a\u767d\u3067\u533a\u5207\u3063\u3066\u8907\u6570\u500b\u6307\u5b9a\u3059\u308b\u3068\u3001\u305d\u308c\u3089\u306e\u5024\u306fRuby\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306f\u3001ARGV\u5909\u6570\u306b\u914d\u5217\u3067\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002ARGV\u5909\u6570\u304b\u3089\u306f\u3001\u914d\u5217\u306e\u8981\u7d20\u3068\u3057\u3066\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067\u6307\u5b9a\u3055\u308c\u305f\u5024\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001p\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001<b>ARGV\u5909\u6570\u304c\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067\u6307\u5b9a\u3057\u305f\u5024\u3092\u3001\u914d\u5217\u3068\u3057\u3066\u4fdd\u6301<\/b>\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p>[\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9]<\/p>\n<pre class=\"lang:ruby decode:true \">p ARGV<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ ruby argv.rb a r g  v\r\n[\"a\", \"r\", \"g\", \"v\"]<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001ARGV\u306f\u914d\u5217\u3067\u3042\u308a\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u6e21\u3055\u308c\u305f\u5024\u3092\u4fdd\u6301\u3057\u3066\u3044\u307e\u3059\u3002\u3042\u3068\u306f\u3001Ruby\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4e2d\u3067\u3001\u597d\u304d\u306a\u6642\u306bARGV\u304b\u3089\u5024\u3092\u53d6\u308a\u51fa\u3057\u3066\u3001\u30c7\u30fc\u30bf\u3068\u3057\u3066\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>while\u3068gets\u3001line\u3067\u5165\u529b\u30eb\u30fc\u30d7<\/h3>\n<p>gets\u306f\u6a19\u6e96\u5165\u529b\u304b\u30891\u884c\u3057\u304b\u5165\u529b\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001while\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u3001\u6a19\u6e96\u5165\u529b\u304b\u3089CTRL+D\uff08\u3042\u308b\u3044\u306fCTRL+Z\uff09\u304c\u5165\u529b\u3055\u308c\u308b\u307e\u3067\u306e\u5165\u529b\u3092\u30011\u884c\u305a\u3064\u3067\u3059\u304c\u3001\u6b62\u307e\u3089\u305a\u306b\u7d9a\u3051\u3066\u53d7\u3051\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u307f\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u306a\u304a\u3001while\u306e\u6761\u4ef6\u5f0f\u306b<\/p>\n<pre class=\"lang:ruby decode:true \">while lien = gets<\/pre>\n<p>\u3068\u300cline = gets\u300d\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3053\u3068\u306b\u3088\u308a\u3001\u4ee3\u5165\u6f14\u7b97\u5b50=\u306e\u5b9f\u884c\u7d50\u679c\u304c\u3001while\u306e\u6761\u4ef6\u5f0f\u306e\u5024\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u300c=\u300d\u306e\u5b9f\u884c\u7d50\u679c\u3068\u306f\u3001\u5909\u6570line\u3078gets\u306e\u5024\u3092\u4ee3\u5165\u3057\u305f\u5f8c\u306eline\u306e\u5024\u306e\u3053\u3068\u3067\u3059\u3002\u901a\u5e38gets\u306f\u6a19\u6e96\u5165\u529b\u306b\u5165\u529b\u3055\u308c\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u5165\u529b\u306e\u7d42\u308f\u308a\u3092\u793a\u3059CTRL\uff0bD\uff08\u3042\u308b\u3044\u306fCTRL+Z\uff09\u304c\u5165\u529b\u3055\u308c\u305f\u3068\u304d\u306f\u3001gets\u306fnil\u3092\u8fd4\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001line\u3082nil\u306b\u306a\u308a\u3001while\u306e\u6761\u4ef6\u5f0f\u306e\u5024\u304cnil\u3068\u306a\u308a\u3001while\u30eb\u30fc\u30d7\u304c\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">puts \"\u4f55\u304b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\r\nwhile line = gets\r\n  p line.chomp\r\nend<\/pre>\n<p>[\u5b9f\u884c\u7d50\u679c]<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">\u4f55\u304b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\nhello\r\n\"hello\"\r\ngood morning!\r\n\"good morning!\"\r\nsee you!\r\n\"see you!\"<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001while\u30eb\u30fc\u30d7\u306e\u304a\u304b\u3052\u3067\u3001CTRL+D\uff08\u3042\u308b\u3044\u306fCTRL+Z\uff09\u304c\u5165\u529b\u3055\u308c\u308b\u307e\u3067\u3001\u7e70\u308a\u8fd4\u3057gets\u3067\u6a19\u6e96\u5165\u529b\u304b\u3089\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3044\u304b\u304c\u3067\u3057\u305f\u3067\u3057\u3087\u3046\u304b\u3002\u3053\u3053\u3067\u306f\u3001Ruby\u3068\u6a19\u6e96\u5165\u529b\u306e\u95a2\u4fc2\u306b\u3064\u3044\u3066\u3001\u4e00\u901a\u308a\u89e3\u8aac\u3057\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u6a19\u6e96\u5165\u529b\u3068\u8a00\u308f\u308c\u308b\u3068\u3001\u3059\u3054\u304f\u96e3\u3057\u3044\u6982\u5ff5\u306e\u3088\u3046\u306b\u69cb\u3048\u3066\u3057\u307e\u3044\u305d\u3046\u3067\u3059\u304c\u3001\u6a19\u6e96\u5165\u529b\u306f\u96e3\u3057\u304f\u8003\u3048\u305a\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u306e\u5165\u529b\u3068\u8003\u3048\u308c\u3070\u3001\u8151\u306b\u843d\u3061\u3084\u3059\u3044\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u5b66\u7fd2\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u632f\u308a\u8fd4\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n<div class=\"box01\"><\/p>\n<ul>\n<li><b>\u6a19\u6e96\u5165\u529b\u3068\u306f\u30ad\u30fc\u30dc\u30fc\u30c9\u304b\u3089\u306e\u5165\u529b\u306e\u3053\u3068\u3002<\/b><\/li>\n<li><b>Ruby\u3067\u6a19\u6e96\u5165\u529b\u304b\u3089\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5165\u529b\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001gets\u3092\u4f7f\u3046\u3068\u4fbf\u5229\u3002<\/b><\/li>\n<li><b>gets\u3067\u5165\u529b\u3057\u305f\u6587\u5b57\u5217\u306b\u306f\u6539\u884c\u30b3\u30fc\u30c9\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u305f\u3081\u3001chomp!\u3067\u6539\u884c\u30b3\u30fc\u30c9\u3060\u3051\u524a\u9664\u3059\u308b\u3002<\/b><\/li>\n<li><b>\u6a19\u6e96\u5165\u529b\u304b\u3089\u8907\u6570\u884c\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001readlines\u3092\u4f7f\u7528\u3059\u308b\u3002<\/b><\/li>\n<li><b>Ruby\u306f\u6a19\u6e96\u5165\u529b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u305d\u308c\u306f\u5909\u6570$stdin\u3001\u5b9a\u6570STDIN\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b<\/b><\/li>\n<li><b>$stdin\u3001STDIN\u3092\u30ec\u30b7\u30fc\u30d0\u3068\u3057\u3066\u3001gets\u3001readlines\u3001read\u306a\u3069\u304c\u4f7f\u7528\u3067\u304d\u308b\u3002<\/b><\/li>\n<li><b>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u6587\u5b57\u5217\u306f\u914d\u5217ARGV\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3002<\/b><\/li>\n<li><b>while\u3068gets\u3001line\u3092\u4f7f\u3063\u3066\u3001\u6a19\u6e96\u5165\u529b\u304b\u3089\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b\u3092\u4f55\u884c\u3067\u3082\u53d6\u5f97\u3067\u304d\u308b\u3002<\/b><\/li>\n<\/ul>\n<\/div>\n<p>\u4f7f\u3044\u65b9\u3092\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u3089\u3001\u307e\u305f\u3053\u306e\u30da\u30fc\u30b8\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01Web\u30b3\u30fc\u30c0\u30fc\u30fb\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u8c9d\u539f\uff08@touhicomu\uff09\u3067\u3059\u3002 \u4eca\u65e5\u306f\u3001Ruby\u306e\u6a19\u6e96\u5165\u529b\u306b\u3064\u3044\u3066\u3001\u66f8\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u3044\u304d\u306a\u308a\u300c\u6a19\u6e96\u5165\u529b\u300d\u3068\u8a00\u3063\u3066\u3082\u3001\u4f55\u304c\u300c\u6a19\u6e96\u300d\u3067\u4f55\u304c\u300c\u5165\u529b\u300d\u306a\u306e\u304b\u3001\u308f\u304b\u308a\u3065\u3089\u3044\u3067\u3059\u3088\u306d [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":41117,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2352],"tags":[114,68],"class_list":["post-14078","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-study","tag-ruby","tag-68"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\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.sejuku.net\/blog\/14078\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/14078\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-10T07:26:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:40:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/12\/20171228_ruby_stdin.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09\",\"datePublished\":\"2017-01-10T07:26:41+00:00\",\"dateModified\":\"2024-05-06T02:40:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078\"},\"wordCount\":228,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/12\\\/20171228_ruby_stdin.jpg\",\"keywords\":[\"ruby\",\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\"],\"articleSection\":[\"Ruby\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078\",\"name\":\"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/12\\\/20171228_ruby_stdin.jpg\",\"datePublished\":\"2017-01-10T07:26:41+00:00\",\"dateModified\":\"2024-05-06T02:40:03+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/12\\\/20171228_ruby_stdin.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/12\\\/20171228_ruby_stdin.jpg\",\"width\":700,\"height\":400,\"caption\":\"\u3010Ruby\u5165\u9580\u3011Ruby\u3067\u6a19\u6e96\u5165\u529b\u3010gets\u3001$stdin\u3001\u8907\u6570\u884c\u3001\u914d\u5217\u3011\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/14078#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\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.sejuku.net\/blog\/14078","og_locale":"ja_JP","og_type":"article","og_title":"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/14078","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"2017-01-10T07:26:41+00:00","article_modified_time":"2024-05-06T02:40:03+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/12\/20171228_ruby_stdin.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/14078#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/14078"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09","datePublished":"2017-01-10T07:26:41+00:00","dateModified":"2024-05-06T02:40:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/14078"},"wordCount":228,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/14078#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/12\/20171228_ruby_stdin.jpg","keywords":["ruby","\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0"],"articleSection":["Ruby\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/14078","url":"https:\/\/www.sejuku.net\/blog\/14078","name":"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/14078#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/14078#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/12\/20171228_ruby_stdin.jpg","datePublished":"2017-01-10T07:26:41+00:00","dateModified":"2024-05-06T02:40:03+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/14078#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/14078"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/14078#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/12\/20171228_ruby_stdin.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/12\/20171228_ruby_stdin.jpg","width":700,"height":400,"caption":"\u3010Ruby\u5165\u9580\u3011Ruby\u3067\u6a19\u6e96\u5165\u529b\u3010gets\u3001$stdin\u3001\u8907\u6570\u884c\u3001\u914d\u5217\u3011"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/14078#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u57fa\u790e\u304b\u3089\u308f\u304b\u308b\uff01Ruby\u3067\u6a19\u6e96\u5165\u529b\u3092\u6271\u3046\u65b9\u6cd5\uff08\u8907\u6570\u884c\u3001\u914d\u5217\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/14078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=14078"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/14078\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/41117"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=14078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=14078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=14078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}