~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to golf_prelude.c

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 sources: golf_prelude
5
5
*/
6
6
#include "ruby/ruby.h"
 
7
#include "internal.h"
7
8
#include "vm_core.h"
8
9
 
9
10
 
123
124
"  alias old_inspect inspect\n"
124
125
"  alias inspect old_to_s\n"
125
126
"end\n"
 
127
"\n"
 
128
"class Symbol\n"
 
129
"  def call(*args, &block)\n"
 
130
"    proc do |recv|\n"
 
131
"      recv.__send__(self, *args, &block)\n"
 
132
"    end\n"
 
133
"  end\n"
 
134
"end\n"
126
135
;
127
136
 
128
137
#define PRELUDE_COUNT 0
129
138
 
130
139
 
131
 
VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE filepath, VALUE line, VALUE opt);
132
 
 
133
140
static void
134
141
prelude_eval(VALUE code, VALUE name, VALUE line)
135
142
{