mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00

miniruby is used by tool/runruby.rb, so we need to ensure we don't rb_bug when RUBY_GC_LIBRARY_PATH is set so we can run tests using the make commands. This commit changes it to warn instead.
37 lines
739 B
C
37 lines
739 B
C
// This file is used by miniruby, not ruby.
|
|
// ruby uses dln.c.
|
|
|
|
#include "ruby/ruby.h"
|
|
|
|
bool
|
|
dln_supported_p(void)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
NORETURN(void *dln_load(const char *));
|
|
void*
|
|
dln_load(const char *file)
|
|
{
|
|
rb_loaderror("this executable file can't load extension libraries");
|
|
|
|
UNREACHABLE_RETURN(NULL);
|
|
}
|
|
|
|
NORETURN(void *dln_symbol(void*,const char*));
|
|
void*
|
|
dln_symbol(void *handle, const char *symbol)
|
|
{
|
|
rb_loaderror("this executable file can't load extension libraries");
|
|
|
|
UNREACHABLE_RETURN(NULL);
|
|
}
|
|
|
|
void*
|
|
dln_open(const char *library, char *error, size_t size)
|
|
{
|
|
static const char *error_str = "this executable file can't load extension libraries";
|
|
strlcpy(error, error_str, size);
|
|
return NULL;
|
|
}
|
|
|