This repository was archived by the owner on Apr 14, 2021. It is now read-only.
Commit 0c5d3b8
committed
Auto merge of #6503 - koic:use_dir_instead_of_file_in_newgem_template, r=hsbt
Use `__dir__` instead of `__FILE__` in newgem.gemspec template
### What was the end-user problem that led to this PR?
Since Ruby 2.0 we've had `__dir__` as well as `__FILE__`.
The initial gem codes written with `bundle gem` using Ruby 2.0 or higher is an old description using `__FILE__`.
### What was your diagnosis of the problem?
Ruby 1.9 is EOL, so I think that there is not much Gem to start developed using it.
### What is your fix for the problem, implemented in this PR?
This PR uses `__dir__` when starting Gem development (i.e. `bundle gem`) using Ruby 2.0 or higher version.2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
3 | 7 | | |
4 | 8 | | |
0 commit comments