Skip to content

Commit 260ced7

Browse files
committed
Fix a bug on re-generating binstub
1 parent fd5cb71 commit 260ced7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Next release
22

3+
* Fix a bug on re-generating binstub (#534)
34
* Preserve comments right after the shebang line which might include magic comments such as `frozen_string_literal: true'
45

56
## 2.0.2

lib/spring/client/binstub.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Binstub < Command
4949
%{begin\n load File.expand_path("../spring", __FILE__)\nrescue LoadError\nend\n},
5050
%{begin\n load File.expand_path('../spring', __FILE__)\nrescue LoadError\nend\n},
5151
%{begin\n spring_bin_path = File.expand_path('../spring', __FILE__)\n load spring_bin_path\nrescue LoadError => e\n raise unless e.message.end_with? spring_bin_path, 'spring/binstub'\nend\n},
52-
LOADER
52+
/begin\n load File\.expand_path\(['"]\.\.\/spring['"], __FILE__\)\nrescue LoadError => e\n raise unless e\.message\.include\?\(['"]spring['"]\)\nend\n/
5353
]
5454

5555
class Item

0 commit comments

Comments
 (0)