File: pact.rb

package info (click to toggle)
ruby-oj 2.17.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 968 kB
  • ctags: 1,672
  • sloc: ansic: 10,658; ruby: 6,524; makefile: 2
file content (21 lines) | stat: -rwxr-xr-x 368 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env ruby
# encoding: UTF-8

$: << File.dirname(__FILE__)
['ext', 'lib'].each do |dir|
  $: << File.join(File.dirname(File.expand_path(File.dirname(__FILE__))), dir)
end

#require 'json'
require 'oj'

Oj.mimic_JSON()
require 'pact'

puts "*** responds? #{Regexp.respond_to?(:json_create)}"

j = /1/.to_json

puts "json: #{j}"

puts "regexp: #{JSON.load(j)}"