<commit_before>const expect = require('chai').expect
const repl = require('../lib/repl')

describe('REPL', function() {
  it('can execute JavaScript', () => {
    expect(repl.js('Math.ceil(23.4)')).to.equal('24')
  })
  it('can execute Ruby', done => {
    repl.rb('Math::cos(0)').then(reply => {
      expect(reply).to.equal("1.0\n")
      done()
    }).catch(done)
  })
  it('converts single quotes to double for ruby', done => {
    repl.rb("'hello'").then(reply => {
      expect(reply).to.equal("hello\n")
      done()
    }).catch(done)
  })
  it('executes nested puts without failure', done => {
    repl.rb("puts 'hello'").then(reply => {
      expect(reply).to.equal("hello\n\n")
      done()
    }).catch(done)
  })
  it('prevents system calls and shell execution in ruby', done => {
    repl.rb("`uname`").then(reply => {
      expect(reply).to.equal("Unsafe characters found")
      done()
    }).catch(done)
    repl.rb("system(uname)").then(reply => {
      expect(reply).to.equal("Unsafe characters found")
    })
    repl.rb("exec(uname)").then(reply => {
      expect(reply).to.equal("Unsafe characters found")
    })
    repl.rb("%x(uname)").then(reply => {
      expect(reply).to.equal("Unsafe characters found")
    })
    repl.rb('require "open3"').then(reply => {
      expect(reply).to.equal("Unsafe characters found")
    })
  })
  it('prevents metaprogramming for ruby repl', done => {
    repl.rb('send').then(reply => {
      expect(reply).to.equal("Unsafe characters found")
      done()
    }).catch(done)
  })
})<commit_msg>Remove tests for Ruby REPL<commit_after>const expect = require('chai').expect
const repl = require('../lib/repl')

describe('REPL', function() {
  it('can execute JavaScript', () => {
    expect(repl.js('Math.ceil(23.4)')).to.equal('24')
  })
})
{'fraction_non_alphanumeric': 0.21345191773207337, 'fraction_numerical': 0.007782101167315175, 'mean_word_length': 3.3373493975903616, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1828659', 'n_tokens_mistral': 614, 'n_tokens_neox': 614, 'n_words': 103}