irb 1.15.0 → 1.15.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/irb/pager.rb +10 -7
  3. data/lib/irb/version.rb +2 -2
  4. metadata +3 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5167476c1b7e39f80080c2970d4974dac3a84a6721c027f0429ae9c793dfba92
4
- data.tar.gz: 357002e006b01bbfd46dc36bae924c9b79adefc9b213b341fcc0f80134d0579c
3
+ metadata.gz: ce1957978a2c18545492323b39bd054ce881cbd54aae4b2056cee739c41b17c9
4
+ data.tar.gz: 52d7820dbc752ec441cf7f255ef3e5c94bd9ed524c186f51c52003eb10627db2
5
5
  SHA512:
6
- metadata.gz: baeace22dd0cc116af8ddc4126fa6fee4b314008ffa56632547047501aefd6d8806e3d9a3518cd576422b8751ec285cb837c93b924a1f12c6230cd701c72f802
7
- data.tar.gz: b9bce4b85a77cada09e1d4f06394aee7540cd307e9ce321a2ce5d609a3f6ee2f80dbcb1fce04374bddffb9f2a5370792a4b1498aa9479f8fd11d5340dd24da6a
6
+ metadata.gz: 35eb9995bb8dd7289360bff316d94af1df148ae36dc8bb0fc9dcfde1e78d940147a1021f93b2875c1f73f528ad3cb2198a292707d180bf4a7d510efb972e7d65
7
+ data.tar.gz: 6ab14019f16bb0b62ac075291067dd48c184e89e1e185ba9e57c1ac376e2115ac4da93d03aca45b21088531664da67e3deba983f43052e8bbd0511102aadff2d
data/lib/irb/pager.rb CHANGED
@@ -152,11 +152,13 @@ module IRB
152
152
  end
153
153
 
154
154
  def puts(text = '')
155
+ text = text.to_s unless text.is_a?(String)
155
156
  write(text)
156
157
  write("\n") unless text.end_with?("\n")
157
158
  end
158
159
 
159
160
  def write(text)
161
+ text = text.to_s unless text.is_a?(String)
160
162
  @string << text
161
163
  if @multipage
162
164
  if @delay_until && Time.now > @delay_until
@@ -171,23 +173,24 @@ module IRB
171
173
  text = text[0, overflow_size]
172
174
  overflow = true
173
175
  end
174
-
175
176
  @buffer << text
176
- @col += Reline::Unicode.calculate_width(text)
177
+ @col += Reline::Unicode.calculate_width(text, true)
177
178
  if text.include?("\n") || @col >= @width
178
179
  @buffer.lines.each do |line|
179
180
  wrapped_lines = Reline::Unicode.split_by_width(line.chomp, @width).first.compact
180
181
  wrapped_lines.pop if wrapped_lines.last == ''
181
182
  @lines.concat(wrapped_lines)
182
- if @lines.empty?
183
- @lines << "\n"
184
- elsif line.end_with?("\n")
185
- @lines[-1] += "\n"
183
+ if line.end_with?("\n")
184
+ if @lines.empty? || @lines.last.end_with?("\n")
185
+ @lines << "\n"
186
+ else
187
+ @lines[-1] += "\n"
188
+ end
186
189
  end
187
190
  end
188
191
  @buffer.clear
189
192
  @buffer << @lines.pop unless @lines.last.end_with?("\n")
190
- @col = Reline::Unicode.calculate_width(@buffer)
193
+ @col = Reline::Unicode.calculate_width(@buffer, true)
191
194
  end
192
195
  if overflow || @lines.size > @height || (@lines.size == @height && @col > 0)
193
196
  @first_page_lines = @lines.take(@height)
data/lib/irb/version.rb CHANGED
@@ -5,7 +5,7 @@
5
5
  #
6
6
 
7
7
  module IRB # :nodoc:
8
- VERSION = "1.15.0"
8
+ VERSION = "1.15.1"
9
9
  @RELEASE_VERSION = VERSION
10
- @LAST_UPDATE_DATE = "2025-01-21"
10
+ @LAST_UPDATE_DATE = "2025-01-22"
11
11
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - aycabta
8
8
  - Keiju ISHITSUKA
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2025-01-21 00:00:00.000000000 Z
11
+ date: 2025-01-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: reline
@@ -157,7 +156,6 @@ metadata:
157
156
  source_code_uri: https://github.com/ruby/irb
158
157
  documentation_uri: https://ruby.github.io/irb/
159
158
  changelog_uri: https://github.com/ruby/irb/releases
160
- post_install_message:
161
159
  rdoc_options: []
162
160
  require_paths:
163
161
  - lib
@@ -172,8 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
170
  - !ruby/object:Gem::Version
173
171
  version: '0'
174
172
  requirements: []
175
- rubygems_version: 3.5.11
176
- signing_key:
173
+ rubygems_version: 3.6.3
177
174
  specification_version: 4
178
175
  summary: Interactive Ruby command-line tool for REPL (Read Eval Print Loop).
179
176
  test_files: []