<commit_before>/**
 * Copyright 2005-2007 <NAME>
 * Distributed under the GNU General Public License 2.0
 */

package com.xruby.runtime.lang;

import com.xruby.runtime.value.ObjectFactory;
import com.xruby.runtime.value.RubyArray;

public abstract class RubyProgram {

    public RubyValue invoke() {
        return invoke(ObjectFactory.TOP_LEVEL_SELF_VALUE, null, null, RubyRuntime.ObjectClass);
    }

    public RubyValue invoke(RubyValue receiver, RubyArray args, RubyBlock block, RubyModule scope) {
        RubyRuntime.ObjectClass.setAccessPrivate();/*so that top level methods are private methods of Object by default*/
        return run(receiver, args, block, scope);
    }

    protected abstract RubyValue run(RubyValue receiver, RubyArray args, RubyBlock block, RubyModule scope);
}<commit_msg>setAccessPrivate() was called in wrong place<commit_after>/**
 * Copyright 2005-2007 <NAME>
 * Distributed under the GNU General Public License 2.0
 */

package com.xruby.runtime.lang;

import com.xruby.runtime.value.ObjectFactory;
import com.xruby.runtime.value.RubyArray;

public abstract class RubyProgram {

    public RubyValue invoke() {
        RubyRuntime.ObjectClass.setAccessPrivate();//so that top level methods are private methods of Object by default
        return invoke(ObjectFactory.TOP_LEVEL_SELF_VALUE, null, null, RubyRuntime.ObjectClass);
    }

    public RubyValue invoke(RubyValue receiver, RubyArray args, RubyBlock block, RubyModule scope) {
        return run(receiver, args, block, scope);
    }

    protected abstract RubyValue run(RubyValue receiver, RubyArray args, RubyBlock block, RubyModule scope);
}
{'fraction_non_alphanumeric': 0.08531383302864107, 'fraction_numerical': 0.01218769043266301, 'mean_word_length': 4.366013071895424, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4032058', 'n_tokens_mistral': 474, 'n_tokens_neox': 430, 'n_words': 141}