質問編集履歴
1
書式改善
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,6 +8,16 @@
|
|
8
8
|
```error
|
9
9
|
no implicit conversion of nil into String
|
10
10
|
```
|
11
|
+
|
12
|
+
```senryu.rb
|
13
|
+
noun = node.surface
|
14
|
+
index = @sent.index(noun)
|
15
|
+
error=> read_word = "#{@kana[index]}" + @kana[index + 1]
|
16
|
+
# 文字数を数える
|
17
|
+
if read_word.gsub(/ァ|ィ|ゥ|ェ|ォ|ヵ|ヶ|ャ|ョ/, '').length == 7
|
18
|
+
middle = @sent[index] + @sent[index + 1]
|
19
|
+
|
20
|
+
```
|
11
21
|
ツイートを取得します
|
12
22
|
|
13
23
|
```tweet.rb
|
@@ -157,4 +167,9 @@
|
|
157
167
|
end
|
158
168
|
```
|
159
169
|
|
160
|
-
なにかわかる方いらしましたら教えていただきたいです。
|
170
|
+
なにかわかる方いらしましたら教えていただきたいです。
|
171
|
+
|
172
|
+
---
|
173
|
+
ちなみにエラーの個所の記述を
|
174
|
+
```read_word = @kana[index] + @kana[index + 1]```とするとエラーが
|
175
|
+
```undefined method `+' for nil:NilClass```に代わりました。
|