Skip to content

Commit

Permalink
Update link to CoffeeScript source in README.md
Browse files Browse the repository at this point in the history
Update the link to the CoffeeScript source in README.md and replace the
use of "open-uri" with "net/http", as that is more conventional in 2024.
  • Loading branch information
mattmenefee committed Feb 8, 2024
1 parent e630a1f commit 4dd71a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ A longer example, demonstrating how to invoke the CoffeeScript compiler:

``` ruby
require "execjs"
require "open-uri"
source = open("http://coffeescript.org/extras/coffee-script.js").read
require "net/http"
source = Net::HTTP.get(URI("https://coffeescript.org/browser-compiler-legacy/coffeescript.js"))

context = ExecJS.compile(source)
context.call("CoffeeScript.compile", "square = (x) -> x * x", bare: true)
Expand Down

0 comments on commit 4dd71a2

Please sign in to comment.