Skip to content

Commit aefa9e5

Browse files
committed
Merge pull request Kapeli#10 from chitsaou/instance-eval-file-path
when evaluating a cheatsheet ruby script, let it know where __FILE__ is.
2 parents 5739182 + 693a763 commit aefa9e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cheatset/dsl/context.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Cheatset
22
module DSL
33
class Context
44
def initialize(filename)
5-
instance_eval(File.read(filename))
5+
instance_eval(File.read(filename), File.expand_path(filename))
66
@filename = filename
77
end
88
def generate

0 commit comments

Comments
 (0)