質問編集履歴

2

質問の解答

2021/03/15 02:10

投稿

aiai8976
aiai8976

スコア112

test CHANGED
File without changes
test CHANGED
@@ -101,3 +101,53 @@
101
101
  ruby is hashed (/Users/username/.rbenv/shims/ruby)
102
102
 
103
103
  ```
104
+
105
+
106
+
107
+ ```
108
+
109
+ $ cat /Users/username/.rbenv/shims/ruby
110
+
111
+ #!/usr/bin/env bash
112
+
113
+ set -e
114
+
115
+ [ -n "$RBENV_DEBUG" ] && set -x
116
+
117
+
118
+
119
+ program="${0##*/}"
120
+
121
+ if [ "$program" = "ruby" ]; then
122
+
123
+ for arg; do
124
+
125
+ case "$arg" in
126
+
127
+ -e* | -- ) break ;;
128
+
129
+ */* )
130
+
131
+ if [ -f "$arg" ]; then
132
+
133
+ export RBENV_DIR="${arg%/*}"
134
+
135
+ break
136
+
137
+ fi
138
+
139
+ ;;
140
+
141
+ esac
142
+
143
+ done
144
+
145
+ fi
146
+
147
+
148
+
149
+ export RBENV_ROOT="/Users/username/.rbenv"
150
+
151
+ exec "/usr/local/Cellar/rbenv/1.1.2/libexec/rbenv" exec "$program" "$@"
152
+
153
+ ```

1

質問の解答

2021/03/15 02:10

投稿

aiai8976
aiai8976

スコア112

test CHANGED
File without changes
test CHANGED
@@ -87,3 +87,17 @@
87
87
  stdin_open: true
88
88
 
89
89
  ```
90
+
91
+
92
+
93
+ ##試したこと
94
+
95
+
96
+
97
+ ```
98
+
99
+ $ type ruby
100
+
101
+ ruby is hashed (/Users/username/.rbenv/shims/ruby)
102
+
103
+ ```