string-text 0.2.1 → 0.2.2

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: ef4d50e5bf3891bbbeb0e9c85550bfe11b978843594f5ce6473800c7aa0b8da7
4
- data.tar.gz: 6092c921901c893fbdfdb523a979003af64bbee0e57c1c31018d9f17f5d3c73a
3
+ metadata.gz: ed317a1e41b961f812910fc9f82664692615953dba53a39ac117c3dc706e8fbc
4
+ data.tar.gz: 83426aa78c20ed366b7c525dbbc66ac684ac7d1238d4b8abe7f50124b545de42
5
5
  SHA512:
6
- metadata.gz: 611f496cdc55ecfb9adff70ee277782f0e8a948563efb2041d97f61b597722e9e9b091baa3d9955d69d6363e2c4bd1e55ba7df28c10ec3042b45f3961dfad9e5
7
- data.tar.gz: 53a0a44cca61fcd5fe7c88ebf4c953dfa84e3e0a95fef9829cdb85d609a28e6ed2113fa3a2bdd3beb3c54761f0960847eab1f71637a0ddb7a642b830dcaeb783
6
+ metadata.gz: dc43bac8d3c17c6026dfb1bc664bdfa97d2c444632b1736811b5151cad1addaf9c240ad588fb2d892febaa465367d1de9b470e2137de78802a0174b79c5898d3
7
+ data.tar.gz: 2f3a125f542cd525cc5f341a1d4570a5190926df1b795dac86babbd98889ddc247cb5f80017868c4010f8593e0e7e898443d0cc05ca7544676cb93995a454aa5
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module String::Text
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
data/lib/string-text.rb CHANGED
@@ -26,7 +26,7 @@ module String::Text
26
26
  lines.shift while !lines.empty? && !(lines.first =~ /^(\s*)\S/)
27
27
  return "" if lines.empty?
28
28
  indent = $1.size
29
- lines.map { |line| line[indent..-1].rstrip || "" }.join("\n")
29
+ lines.map { |line| line[indent..-1]&.rstrip || "" }.join("\n")
30
30
  end
31
31
 
32
32
  # Converts a string to a boolean so that "true" becomes true and that
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: string-text
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-05 00:00:00.000000000 Z
11
+ date: 2024-06-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Gem string-text
14
14
  email: