rubinius-core-api 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +20 -0
- data/Rakefile +36 -0
- data/lib/rubinius/core-api.rb +16 -0
- data/lib/rubinius/kernel/bootstrap/channel.rb +106 -0
- data/lib/rubinius/kernel/common/bytearray.rb +26 -0
- data/lib/rubinius/kernel/common/channel.rb +21 -0
- data/lib/rubinius/kernel/common/env.rb +239 -0
- data/lib/rubinius/kernel/common/thread.rb +118 -0
- data/lib/rubinius/kernel/common/tuple.rb +148 -0
- data/lib/rubinius/kernel/common/type.rb +114 -0
- data/rubinius-core-api.gemspec +28 -0
- data/src/org/jruby/ext/rubinius/RubiniusByteArray.java +290 -0
- data/src/org/jruby/ext/rubinius/RubiniusChannel.java +115 -0
- data/src/org/jruby/ext/rubinius/RubiniusEnvironmentAccess.java +57 -0
- data/src/org/jruby/ext/rubinius/RubiniusKernel.java +42 -0
- data/src/org/jruby/ext/rubinius/RubiniusLibrary.java +111 -0
- data/src/org/jruby/ext/rubinius/RubiniusTuple.java +302 -0
- data/src/org/jruby/ext/rubinius/RubiniusType.java +43 -0
- metadata +85 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
/*
|
2
|
+
**** BEGIN LICENSE BLOCK *****
|
3
|
+
* Version: CPL 1.0/GPL 2.0/LGPL 2.1
|
4
|
+
*
|
5
|
+
* The contents of this file are subject to the Common Public
|
6
|
+
* License Version 1.0 (the "License"); you may not use this file
|
7
|
+
* except in compliance with the License. You may obtain a copy of
|
8
|
+
* the License at http://www.eclipse.org/legal/cpl-v10.html
|
9
|
+
*
|
10
|
+
* Software distributed under the License is distributed on an "AS
|
11
|
+
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
12
|
+
* implied. See the License for the specific language governing
|
13
|
+
* rights and limitations under the License.
|
14
|
+
*
|
15
|
+
* Copyright (C) 2011 Charles O Nutter <headius@headius.com>
|
16
|
+
*
|
17
|
+
* Alternatively, the contents of this file may be used under the terms of
|
18
|
+
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
19
|
+
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
20
|
+
* in which case the provisions of the GPL or the LGPL are applicable instead
|
21
|
+
* of those above. If you wish to allow use of your version of this file only
|
22
|
+
* under the terms of either the GPL or the LGPL, and not to allow others to
|
23
|
+
* use your version of this file under the terms of the CPL, indicate your
|
24
|
+
* decision by deleting the provisions above and replace them with the notice
|
25
|
+
* and other provisions required by the GPL or the LGPL. If you do not delete
|
26
|
+
* the provisions above, a recipient may use your version of this file under
|
27
|
+
* the terms of any one of the CPL, the GPL or the LGPL.
|
28
|
+
***** END LICENSE BLOCK *****/
|
29
|
+
package org.jruby.ext.rubinius;
|
30
|
+
|
31
|
+
import org.jruby.RubyModule;
|
32
|
+
import org.jruby.anno.JRubyMethod;
|
33
|
+
import org.jruby.runtime.ThreadContext;
|
34
|
+
import org.jruby.runtime.builtin.IRubyObject;
|
35
|
+
|
36
|
+
public class RubiniusType {
|
37
|
+
|
38
|
+
@JRubyMethod(meta = true, name = "object_kind_of?")
|
39
|
+
public static IRubyObject obj_kind_of_p(ThreadContext context, IRubyObject self, IRubyObject obj, IRubyObject cls) {
|
40
|
+
return context.runtime.newBoolean(((RubyModule) cls).isInstance(obj));
|
41
|
+
}
|
42
|
+
|
43
|
+
}
|
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubinius-core-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Charles Oliver Nutter
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-06-16 00:00:00 -07:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: Cross-impl versions of interesting Rubinius core classes
|
23
|
+
email:
|
24
|
+
- headius@headius.com
|
25
|
+
executables: []
|
26
|
+
|
27
|
+
extensions: []
|
28
|
+
|
29
|
+
extra_rdoc_files: []
|
30
|
+
|
31
|
+
files:
|
32
|
+
- lib/rubinius/core-api.rb
|
33
|
+
- lib/rubinius/kernel/bootstrap/channel.rb
|
34
|
+
- lib/rubinius/kernel/common/bytearray.rb
|
35
|
+
- lib/rubinius/kernel/common/channel.rb
|
36
|
+
- lib/rubinius/kernel/common/env.rb
|
37
|
+
- lib/rubinius/kernel/common/thread.rb
|
38
|
+
- lib/rubinius/kernel/common/tuple.rb
|
39
|
+
- lib/rubinius/kernel/common/type.rb
|
40
|
+
- src/org/jruby/ext/rubinius/RubiniusByteArray.java
|
41
|
+
- src/org/jruby/ext/rubinius/RubiniusChannel.java
|
42
|
+
- src/org/jruby/ext/rubinius/RubiniusEnvironmentAccess.java
|
43
|
+
- src/org/jruby/ext/rubinius/RubiniusKernel.java
|
44
|
+
- src/org/jruby/ext/rubinius/RubiniusLibrary.java
|
45
|
+
- src/org/jruby/ext/rubinius/RubiniusTuple.java
|
46
|
+
- src/org/jruby/ext/rubinius/RubiniusType.java
|
47
|
+
- README.txt
|
48
|
+
- rubinius-core-api.gemspec
|
49
|
+
- Rakefile
|
50
|
+
has_rdoc: true
|
51
|
+
homepage: http://github.com/rubinius/rubinius-core-api
|
52
|
+
licenses: []
|
53
|
+
|
54
|
+
post_install_message:
|
55
|
+
rdoc_options: []
|
56
|
+
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
hash: 3
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
version: "0"
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
requirements: []
|
78
|
+
|
79
|
+
rubyforge_project:
|
80
|
+
rubygems_version: 1.5.2
|
81
|
+
signing_key:
|
82
|
+
specification_version: 3
|
83
|
+
summary: Cross-impl versions of interesting Rubinius core classes
|
84
|
+
test_files: []
|
85
|
+
|