irb 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cafd02c241d954487f11903643ef4a4218d39352c889f3be57a1e9314acb174
4
- data.tar.gz: 0f4afd5294f5357835df0519b0a32cba425cf40a1afc225cf3acf0ae4d0cb04a
3
+ metadata.gz: 06c24147c0b5bb8af2c024688cee07a8c03ebfa3d804139ea3dc767dbb7a6b72
4
+ data.tar.gz: f963948ad72203fec9e8c5cd9d408451718675048c5ca8104fedbdcc34b07483
5
5
  SHA512:
6
- metadata.gz: 958f6f1750e5cb951110a1de09beebee65e24c931989da99dd05a1207f050e96f37490e6def0c484b18a23a91c66ad8119a7aa2c5e48c7ad6eacb4590ea4c397
7
- data.tar.gz: 1c6d64ed48b51f189ba9d5846ffdfeae02eff8e44554c66d54eeaab597b96381bdbe78aeba6f2f5fbb0929ee5517e87584eeebd50c65bc93e5cd3321c1b8260e
6
+ metadata.gz: eefceccb8108975077b8158a8a8a7e03600e3180b039970e729bc3919b414de18505ac817be670a8c8dd108099ce232d8db06f6dc04a74e1c963e369962df158
7
+ data.tar.gz: e5ad1fcece6c08e3d807bead5e63950b1e34f6021ae75c40e647ae94bb075ec9e9b07b92e1665eb873e4397c69ab30d15794520e5ae8b765bb97127cddbaf8db
data/lib/irb.rb CHANGED
@@ -542,7 +542,7 @@ module IRB
542
542
  if @context.echo?
543
543
  if assignment_expression?(line)
544
544
  if @context.echo_on_assignment?
545
- output_value(@context.omit_on_assignment?)
545
+ output_value(@context.echo_on_assignment? == :truncate)
546
546
  end
547
547
  else
548
548
  output_value
@@ -131,12 +131,7 @@ module IRB
131
131
 
132
132
  @echo_on_assignment = IRB.conf[:ECHO_ON_ASSIGNMENT]
133
133
  if @echo_on_assignment.nil?
134
- @echo_on_assignment = true
135
- end
136
-
137
- @omit_on_assignment = IRB.conf[:OMIT_ON_ASSIGNMENT]
138
- if @omit_on_assignment.nil?
139
- @omit_on_assignment = true
134
+ @echo_on_assignment = :truncate
140
135
  end
141
136
 
142
137
  @newline_before_multiline_output = IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT]
@@ -256,27 +251,24 @@ module IRB
256
251
  attr_accessor :echo
257
252
  # Whether to echo for assignment expressions
258
253
  #
259
- # Uses <code>IRB.conf[:ECHO_ON_ASSIGNMENT]</code> if available, or defaults to +true+.
254
+ # If set to +false+, the value of assignment will not be shown.
255
+ #
256
+ # If set to +true+, the value of assignment will be shown.
257
+ #
258
+ # If set to +:truncate+, the value of assignment will be shown and truncated.
259
+ #
260
+ # It defaults to +:truncate+.
260
261
  #
261
262
  # a = "omg"
262
263
  # #=> omg
264
+ # a = "omg" * 10
265
+ # #=> omgomgomgomgomgomgomg...
263
266
  # IRB.CurrentContext.echo_on_assignment = false
264
267
  # a = "omg"
268
+ # IRB.CurrentContext.echo_on_assignment = true
269
+ # a = "omg"
270
+ # #=> omgomgomgomgomgomgomgomgomgomg
265
271
  attr_accessor :echo_on_assignment
266
- # Whether to omit echo for assignment expressions
267
- #
268
- # Uses <code>IRB.conf[:OMIT_ON_ASSIGNMENT]</code> if available, or defaults to +true+.
269
- #
270
- # a = [1] * 10
271
- # #=> [1, 1, 1, 1, 1, 1, 1, 1, ...
272
- # [1] * 10
273
- # #=> [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
274
- # IRB.CurrentContext.omit_on_assignment = false
275
- # a = [1] * 10
276
- # #=> [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
277
- # [1] * 10
278
- # #=> [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
279
- attr_accessor :omit_on_assignment
280
272
  # Whether a newline is put before multiline output.
281
273
  #
282
274
  # Uses <code>IRB.conf[:NEWLINE_BEFORE_MULTILINE_OUTPUT]</code> if available,
@@ -325,7 +317,6 @@ module IRB
325
317
  alias ignore_eof? ignore_eof
326
318
  alias echo? echo
327
319
  alias echo_on_assignment? echo_on_assignment
328
- alias omit_on_assignment? omit_on_assignment
329
320
  alias newline_before_multiline_output? newline_before_multiline_output
330
321
 
331
322
  # Returns whether messages are displayed or not.
@@ -52,7 +52,6 @@ module IRB # :nodoc:
52
52
  @CONF[:IGNORE_EOF] = false
53
53
  @CONF[:ECHO] = nil
54
54
  @CONF[:ECHO_ON_ASSIGNMENT] = nil
55
- @CONF[:OMIT_ON_ASSIGNMENT] = nil
56
55
  @CONF[:VERBOSE] = nil
57
56
 
58
57
  @CONF[:EVAL_HISTORY] = nil
@@ -178,10 +177,8 @@ module IRB # :nodoc:
178
177
  @CONF[:ECHO_ON_ASSIGNMENT] = true
179
178
  when "--noecho-on-assignment"
180
179
  @CONF[:ECHO_ON_ASSIGNMENT] = false
181
- when "--omit-on-assignment"
182
- @CONF[:OMIT_ON_ASSIGNMENT] = true
183
- when "--noomit-on-assignment"
184
- @CONF[:OMIT_ON_ASSIGNMENT] = false
180
+ when "--truncate-echo-on-assignment"
181
+ @CONF[:ECHO_ON_ASSIGNMENT] = :truncate
185
182
  when "--verbose"
186
183
  @CONF[:VERBOSE] = true
187
184
  when "--noverbose"
@@ -11,7 +11,7 @@
11
11
  #
12
12
 
13
13
  module IRB # :nodoc:
14
- VERSION = "1.2.6"
14
+ VERSION = "1.2.7"
15
15
  @RELEASE_VERSION = VERSION
16
- @LAST_UPDATE_DATE = "2020-09-14"
16
+ @LAST_UPDATE_DATE = "2020-09-19"
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keiju ISHITSUKA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-13 00:00:00.000000000 Z
11
+ date: 2020-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reline