File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,12 @@ def run(input, options)
6363 STDERR . puts "\n Parsed #{ num } statements in #{ secs } seconds @ #{ num /secs } statements/second." unless options [ :quiet ]
6464 end
6565rescue
66- fname = input . respond_to? ( :path ) ? input . path : "-stdin-"
66+ fname = case
67+ when input . respond_to? ( :path ) then input . path
68+ when input . respond_to? ( :requested_url ) && input . requested_url then input . requested_url
69+ when input . respond_to? ( :base_uri ) then input . base_uri
70+ else "-stdin-"
71+ end
6772 STDERR . puts ( "Error in #{ fname } " )
6873 raise
6974end
Original file line number Diff line number Diff line change 1+ {
2+ "@context" : {
3+ "@vocab" : "http://example/" ,
4+ "B" : { "@context" : { "c" : "http://example.org/c" } }
5+ } ,
6+ "a" : {
7+ "@context" : { "@vocab" : "http://example.com/" } ,
8+ "@type" : "B" ,
9+ "a" : "A in example.com" ,
10+ "c" : "C in example.org"
11+ } ,
12+ "c" : "C in example"
13+ }
You can’t perform that action at this time.
0 commit comments