evilution 0.16.0 → 0.16.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46fcb52d0561a5756a54aec57feea73d0879dfee69a0da9b191b4204cefc3a09
4
- data.tar.gz: d827547c959475ca82836ad80bfa0c02bdcf129a112fd0919dbf99a7fca3542e
3
+ metadata.gz: '009f01f1d0ff623a8dc2730f05d23f5564118f0996e1d207d1c898a719579632'
4
+ data.tar.gz: 89481ac5c9d0b8b344d14d2acbd320382abb5d0fa4fe3de2fea8a715154e9e0e
5
5
  SHA512:
6
- metadata.gz: c2169e9aec3f90c27bb7de779d7f66cc261c73a58234e356020684527918487522fb13e2ab39a1c50bf0378602ac2849fe280bd9774b934e440d0c2b525ee89f
7
- data.tar.gz: 39da178f17461bfd29557994914e487cfd86abcc7a009cc05af0a944426b971cf39824f8a188414ce6af647f1e87989a1c313237c693c885ce75e68b61f38e77
6
+ metadata.gz: 9de110591c9c23a86d20d521aa3002c7aa1743898ae7e4364f5c3ddfc7060a6907153cb050582bb2a3a7f07804f50f1bce1801e7e70df9ca892906065be0c9be
7
+ data.tar.gz: d658b860c63f7226ae274db15c5abd417b41208043ed113fb0f484f335f377642999fadd2fd33190d24313d98498b75b3df3d2124a0620dc4859a73f3b5a97cb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.16.1] - 2026-03-30
4
+
5
+ ### Fixed
6
+
7
+ - **Critical: SourceSurgeon crashes on multi-byte UTF-8 source files** — `SourceSurgeon.apply` used `String#[]=` with Prism byte offsets, but Ruby interprets indices as character offsets for UTF-8 strings, causing `IndexError` on files containing non-ASCII characters (Cyrillic, CJK, emoji). Fixed by operating on ASCII-8BIT binary encoding before restoring original encoding (#434)
8
+
3
9
  ## [0.16.0] - 2026-03-29
4
10
 
5
11
  ### Added
@@ -4,8 +4,8 @@ require_relative "../ast"
4
4
 
5
5
  module Evilution::AST::SourceSurgeon
6
6
  def self.apply(source, offset:, length:, replacement:)
7
- result = source.dup
8
- result[offset, length] = replacement
9
- result
7
+ binary = source.b
8
+ binary[offset, length] = replacement.b
9
+ binary.force_encoding(source.encoding)
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Evilution
4
- VERSION = "0.16.0"
4
+ VERSION = "0.16.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evilution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Kiselev