mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 13:55:55 +03:00
Merge branch 'ruby1.9' of https://github.com/elektronaut/mal into elektronaut-ruby1.9
This commit is contained in:
commit
f2a758cb13
@ -286,7 +286,7 @@ cd racket
|
||||
./stepX_YYY.rb
|
||||
```
|
||||
|
||||
### Ruby (1.8)
|
||||
### Ruby (1.9+)
|
||||
|
||||
```
|
||||
cd ruby
|
||||
|
@ -1,6 +1,6 @@
|
||||
require "readline"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
|
||||
$core_ns = {
|
||||
:"=" => lambda {|a,b| a == b},
|
||||
|
@ -4,7 +4,7 @@ $history_loaded = false
|
||||
$histfile = "#{ENV['HOME']}/.mal-history"
|
||||
|
||||
def _readline(prompt)
|
||||
if not $history_loaded
|
||||
if !$history_loaded && File.exist?($histfile)
|
||||
$history_loaded = true
|
||||
File.readlines($histfile).each {|l| Readline::HISTORY.push(l.chomp)}
|
||||
end
|
||||
|
@ -1,4 +1,4 @@
|
||||
require "types"
|
||||
require_relative "types"
|
||||
|
||||
def _pr_str(obj, print_readably=true)
|
||||
_r = print_readably
|
||||
|
@ -1,4 +1,4 @@
|
||||
require "types"
|
||||
require_relative "types"
|
||||
|
||||
class Reader
|
||||
def initialize(tokens)
|
||||
|
@ -1,5 +1,4 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require_relative "mal_readline"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,8 +1,7 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,8 +1,7 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,9 +1,8 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require "env"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
require_relative "env"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,10 +1,9 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require "env"
|
||||
require "core"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
require_relative "env"
|
||||
require_relative "core"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,10 +1,9 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require "env"
|
||||
require "core"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
require_relative "env"
|
||||
require_relative "core"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,10 +1,9 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require "env"
|
||||
require "core"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
require_relative "env"
|
||||
require_relative "core"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,10 +1,9 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require "env"
|
||||
require "core"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
require_relative "env"
|
||||
require_relative "core"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,10 +1,9 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require "env"
|
||||
require "core"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
require_relative "env"
|
||||
require_relative "core"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,10 +1,9 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require "env"
|
||||
require "core"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
require_relative "env"
|
||||
require_relative "core"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,10 +1,9 @@
|
||||
$: << File.expand_path(File.dirname(__FILE__))
|
||||
require "mal_readline"
|
||||
require "types"
|
||||
require "reader"
|
||||
require "printer"
|
||||
require "env"
|
||||
require "core"
|
||||
require_relative "mal_readline"
|
||||
require_relative "types"
|
||||
require_relative "reader"
|
||||
require_relative "printer"
|
||||
require_relative "env"
|
||||
require_relative "core"
|
||||
|
||||
# read
|
||||
def READ(str)
|
||||
|
@ -1,4 +1,4 @@
|
||||
require "env"
|
||||
require_relative "env"
|
||||
|
||||
class MalException < StandardError
|
||||
attr_reader :data
|
||||
|
Loading…
Reference in New Issue
Block a user