Skip to content

Commit 66e69fa

Browse files
authored
Remove unused PROMPT_N (#685)
1 parent 65e8e68 commit 66e69fa

File tree

7 files changed

+7
-36
lines changed

7 files changed

+7
-36
lines changed

doc/irb/irb.rd.ja

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ irb起動時に``~/.irbrc''を読み込みます. もし存在しない場合は
125125

126126
IRB.conf[:PROMPT][:MY_PROMPT] = { # プロンプトモードの名前
127127
:PROMPT_I => nil, # 通常のプロンプト
128-
:PROMPT_N => nil, # 継続行のプロンプト
129128
:PROMPT_S => nil, # 文字列などの継続行のプロンプト
130129
:PROMPT_C => nil, # 式が継続している時のプロンプト
131130
:RETURN => " ==>%s\n" # リターン時のプロンプト
@@ -140,7 +139,7 @@ OKです.
140139

141140
IRB.conf[:PROMPT_MODE] = :MY_PROMPT
142141

143-
PROMPT_I, PROMPT_N, PROMPT_S, PROMPT_Cは, フォーマットを指定します.
142+
PROMPT_I, PROMPT_S, PROMPT_Cは, フォーマットを指定します.
144143

145144
%N 起動しているコマンド名が出力される.
146145
%m mainオブジェクト(self)がto_sで出力される.
@@ -155,7 +154,6 @@ PROMPT_I, PROMPT_N, PROMPT_S, PROMPT_Cは, フォーマットを指定します.
155154

156155
IRB.conf[:PROMPT][:DEFAULT] = {
157156
:PROMPT_I => "%N(%m):%03n:%i> ",
158-
:PROMPT_N => "%N(%m):%03n:%i> ",
159157
:PROMPT_S => "%N(%m):%03n:%i%l ",
160158
:PROMPT_C => "%N(%m):%03n:%i* ",
161159
:RETURN => "=> %s\n"

lib/irb.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@
196196
#
197197
# IRB.conf[:PROMPT_MODE][:DEFAULT] = {
198198
# :PROMPT_I => "%N(%m):%03n> ",
199-
# :PROMPT_N => "%N(%m):%03n> ",
200199
# :PROMPT_S => "%N(%m):%03n%l ",
201200
# :PROMPT_C => "%N(%m):%03n* ",
202201
# :RETURN => "%s\n" # used to printf
@@ -206,43 +205,37 @@
206205
#
207206
# # :NULL:
208207
# # :PROMPT_I:
209-
# # :PROMPT_N:
210208
# # :PROMPT_S:
211209
# # :PROMPT_C:
212210
# # :RETURN: |
213211
# # %s
214212
# # :DEFAULT:
215213
# # :PROMPT_I: ! '%N(%m):%03n> '
216-
# # :PROMPT_N: ! '%N(%m):%03n> '
217214
# # :PROMPT_S: ! '%N(%m):%03n%l '
218215
# # :PROMPT_C: ! '%N(%m):%03n* '
219216
# # :RETURN: |
220217
# # => %s
221218
# # :CLASSIC:
222219
# # :PROMPT_I: ! '%N(%m):%03n:%i> '
223-
# # :PROMPT_N: ! '%N(%m):%03n:%i> '
224220
# # :PROMPT_S: ! '%N(%m):%03n:%i%l '
225221
# # :PROMPT_C: ! '%N(%m):%03n:%i* '
226222
# # :RETURN: |
227223
# # %s
228224
# # :SIMPLE:
229225
# # :PROMPT_I: ! '>> '
230-
# # :PROMPT_N: ! '>> '
231226
# # :PROMPT_S:
232227
# # :PROMPT_C: ! '?> '
233228
# # :RETURN: |
234229
# # => %s
235230
# # :INF_RUBY:
236231
# # :PROMPT_I: ! '%N(%m):%03n> '
237-
# # :PROMPT_N:
238232
# # :PROMPT_S:
239233
# # :PROMPT_C:
240234
# # :RETURN: |
241235
# # %s
242236
# # :AUTO_INDENT: true
243237
# # :XMP:
244238
# # :PROMPT_I:
245-
# # :PROMPT_N:
246239
# # :PROMPT_S:
247240
# # :PROMPT_C:
248241
# # :RETURN: |2
@@ -527,8 +520,6 @@ def eval_input
527520
f = @context.prompt_s
528521
elsif continue
529522
f = @context.prompt_c
530-
elsif indent > 0
531-
f = @context.prompt_n
532523
else
533524
f = @context.prompt_i
534525
end

lib/irb/context.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ def main
229229
#
230230
# See IRB@Customizing+the+IRB+Prompt for more information.
231231
attr_accessor :prompt_c
232-
# See IRB@Customizing+the+IRB+Prompt for more information.
233-
attr_accessor :prompt_n
234232
# Can be either the default <code>IRB.conf[:AUTO_INDENT]</code>, or the
235233
# mode set by #prompt_mode=
236234
#
@@ -414,7 +412,6 @@ def prompt_mode=(mode)
414412
@prompt_i = pconf[:PROMPT_I]
415413
@prompt_s = pconf[:PROMPT_S]
416414
@prompt_c = pconf[:PROMPT_C]
417-
@prompt_n = pconf[:PROMPT_N]
418415
@return_format = pconf[:RETURN]
419416
@return_format = "%s\n" if @return_format == nil
420417
if ai = pconf.include?(:AUTO_INDENT)

lib/irb/init.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,43 +58,37 @@ def IRB.init_config(ap_path)
5858
@CONF[:PROMPT] = {
5959
:NULL => {
6060
:PROMPT_I => nil,
61-
:PROMPT_N => nil,
6261
:PROMPT_S => nil,
6362
:PROMPT_C => nil,
6463
:RETURN => "%s\n"
6564
},
6665
:DEFAULT => {
6766
:PROMPT_I => "%N(%m):%03n> ",
68-
:PROMPT_N => "%N(%m):%03n> ",
6967
:PROMPT_S => "%N(%m):%03n%l ",
7068
:PROMPT_C => "%N(%m):%03n* ",
7169
:RETURN => "=> %s\n"
7270
},
7371
:CLASSIC => {
7472
:PROMPT_I => "%N(%m):%03n:%i> ",
75-
:PROMPT_N => "%N(%m):%03n:%i> ",
7673
:PROMPT_S => "%N(%m):%03n:%i%l ",
7774
:PROMPT_C => "%N(%m):%03n:%i* ",
7875
:RETURN => "%s\n"
7976
},
8077
:SIMPLE => {
8178
:PROMPT_I => ">> ",
82-
:PROMPT_N => ">> ",
8379
:PROMPT_S => "%l> ",
8480
:PROMPT_C => "?> ",
8581
:RETURN => "=> %s\n"
8682
},
8783
:INF_RUBY => {
8884
:PROMPT_I => "%N(%m):%03n> ",
89-
:PROMPT_N => nil,
9085
:PROMPT_S => nil,
9186
:PROMPT_C => nil,
9287
:RETURN => "%s\n",
9388
:AUTO_INDENT => true
9489
},
9590
:XMP => {
9691
:PROMPT_I => nil,
97-
:PROMPT_N => nil,
9892
:PROMPT_S => nil,
9993
:PROMPT_C => nil,
10094
:RETURN => " ==>%s\n"

test/irb/test_cmd.rb

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ def test_measure
228228
DEFAULT: {
229229
PROMPT_I: '> ',
230230
PROMPT_S: '> ',
231-
PROMPT_C: '> ',
232-
PROMPT_N: '> '
231+
PROMPT_C: '> '
233232
}
234233
},
235234
PROMPT_MODE: :DEFAULT,
@@ -258,8 +257,7 @@ def test_measure_keeps_previous_value
258257
DEFAULT: {
259258
PROMPT_I: '> ',
260259
PROMPT_S: '> ',
261-
PROMPT_C: '> ',
262-
PROMPT_N: '> '
260+
PROMPT_C: '> '
263261
}
264262
},
265263
PROMPT_MODE: :DEFAULT,
@@ -286,8 +284,7 @@ def test_measure_enabled_by_rc
286284
DEFAULT: {
287285
PROMPT_I: '> ',
288286
PROMPT_S: '> ',
289-
PROMPT_C: '> ',
290-
PROMPT_N: '> '
287+
PROMPT_C: '> '
291288
}
292289
},
293290
PROMPT_MODE: :DEFAULT,
@@ -317,8 +314,7 @@ def test_measure_enabled_by_rc_with_custom
317314
DEFAULT: {
318315
PROMPT_I: '> ',
319316
PROMPT_S: '> ',
320-
PROMPT_C: '> ',
321-
PROMPT_N: '> '
317+
PROMPT_C: '> '
322318
}
323319
},
324320
PROMPT_MODE: :DEFAULT,
@@ -348,8 +344,7 @@ def test_measure_with_custom
348344
DEFAULT: {
349345
PROMPT_I: '> ',
350346
PROMPT_S: '> ',
351-
PROMPT_C: '> ',
352-
PROMPT_N: '> '
347+
PROMPT_C: '> '
353348
}
354349
},
355350
PROMPT_MODE: :DEFAULT,
@@ -375,8 +370,7 @@ def test_measure_with_proc
375370
DEFAULT: {
376371
PROMPT_I: '> ',
377372
PROMPT_S: '> ',
378-
PROMPT_C: '> ',
379-
PROMPT_N: '> '
373+
PROMPT_C: '> '
380374
}
381375
},
382376
PROMPT_MODE: :DEFAULT,

test/irb/test_context.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,6 @@ def main.inspect
454454
def test_default_return_format
455455
IRB.conf[:PROMPT][:MY_PROMPT] = {
456456
:PROMPT_I => "%03n> ",
457-
:PROMPT_N => "%03n> ",
458457
:PROMPT_S => "%03n> ",
459458
:PROMPT_C => "%03n> "
460459
# without :RETURN

test/irb/yamatanooroti/test_rendering.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ def test_autocomplete_with_showdoc_in_gaps_on_narrow_screen_right
179179
write_irbrc <<~'LINES'
180180
IRB.conf[:PROMPT][:MY_PROMPT] = {
181181
:PROMPT_I => "%03n> ",
182-
:PROMPT_N => "%03n> ",
183182
:PROMPT_S => "%03n> ",
184183
:PROMPT_C => "%03n> "
185184
}
@@ -214,7 +213,6 @@ def test_autocomplete_with_showdoc_in_gaps_on_narrow_screen_left
214213
write_irbrc <<~'LINES'
215214
IRB.conf[:PROMPT][:MY_PROMPT] = {
216215
:PROMPT_I => "%03n> ",
217-
:PROMPT_N => "%03n> ",
218216
:PROMPT_S => "%03n> ",
219217
:PROMPT_C => "%03n> "
220218
}

0 commit comments

Comments
 (0)